Welcome Guest, Not a member yet? Register   Sign In
[Solved] $ is not defined
#3

[eluser]babazumbula[/eluser]
[quote author="treeface" date="1280716436"]Have you looked through the source code on the page to see if the jQuery include is actually occurring? Where are you calling validate_credentials() from?[/quote]
I've looked in source code, and it occurs.
validate_credentials() is called from the same controller as index().
Currently project is only on my localhost, don't have any link yet.
In essence it is ajax voting. User selects radio button as answer and hits "Vote". Results are displayed asynchronously (dynamically from database) as soon as hitting "Vote".
Strange thing is that it works when index() loaded as default controller method, but won't when validate_credentials() calls it.
Script is simple and is as follows:
[code]
$(document).ready(function(){
$("#poll #vote").click(function () {
var val = $('input:radio[name=vote]:checked').val();
if(!val){alert('Please choose one answer');die();}
$("#poll").html('<img src="&lt;?php echo base_url();?&gt;picture/ajax-loader.gif"


Messages In This Thread
[Solved] $ is not defined - by El Forum - 08-01-2010, 03:17 PM
[Solved] $ is not defined - by El Forum - 08-01-2010, 03:33 PM
[Solved] $ is not defined - by El Forum - 08-01-2010, 04:02 PM
[Solved] $ is not defined - by El Forum - 08-01-2010, 04:09 PM
[Solved] $ is not defined - by El Forum - 08-02-2010, 02:15 AM
[Solved] $ is not defined - by El Forum - 08-03-2010, 09:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB