Welcome Guest, Not a member yet? Register   Sign In
Problem in Using Ajax
#4

[eluser]Ben Edmunds[/eluser]
Ok going through your code...

I see your reading the book, good job. It was a good book.


First thing, you shouldn't have so many models in your view. Read about php alternative syntax.

And for your problem, I didn't take the time to get it working but from scanning the code I would assume it has something to do with the url.

Usually I create a javascript variable baseurl to reference later, so in your template add

Code:
[removed]
   var baseUrl = "<?php echo base_url();?>";
[removed]

then in your javascript function instead of doing just /welcome/method add the baseUrl in front of it.


If that doesn't fix it I'll get the code running and figure it out but hopefully that's all it is.


Messages In This Thread
Problem in Using Ajax - by El Forum - 10-30-2009, 10:14 PM
Problem in Using Ajax - by El Forum - 10-31-2009, 05:42 AM
Problem in Using Ajax - by El Forum - 10-31-2009, 06:18 AM
Problem in Using Ajax - by El Forum - 10-31-2009, 10:06 PM
Problem in Using Ajax - by El Forum - 10-31-2009, 10:49 PM
Problem in Using Ajax - by El Forum - 11-01-2009, 07:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB