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

[eluser]Anes P.A[/eluser]
Hi pal,
I am Anes, I am a newbie in codeIgniter(CI).
I use Scriptaculous and prototype for a sample shopping cart
application. For Delete item from shopping cart I use
Ajax. But When I click on the delete link I got the
message "Not Found The Requested URL /welcome/ajax_cart was not found

on this server". But according to my friend I check same using
Firebug NET panel , in HTML part of response I got the
message "Javascript is not enabled! Please turn on Javascript to use

this site.". But in my Browser Javascript is Enabled already. then
why this meaage Come and what is the problem.

I attach the working page picture of demo shopping cart...

I expect your reply ASAP.

With thanks
Anes P.A

[eluser]Ben Edmunds[/eluser]
Hey Anes,

Please post the method and view associated with welcome/ajax_cart.

Also, it'd be helpful if you post the javascript that is doing this ajax call.

I am just getting into jQuery, etc and had a similar problem.

Google for more info on the script below.

// ESSENTIAL: Must FIRST load Prototype then Scriptaculous then jQuery.

[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

   var baseUrl = "<?php echo base_url();?>";

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.

[eluser]Anes P.A[/eluser]
Hello Ben, Thanks For Your Apt Reply . I am a newbie in CI. So I attach my
fully Demo project with Database. Pls Download same and Copy in your system
and work it, I don't know what it's problem.

My Demo work can download from link:

Pls Help me I am waiting your Reply.

With Thanks


[eluser]Anes P.A[/eluser]
Hello Ben,

I try according to you , But Really sorry I don't get it , now i got 404 Page not Found Error. Pls help me I appreciate your good mind. I am really novice .

Pls help me ...

With Tons of thanks

Anes P.A

Theme © iAndrew 2016 - Forum software by © MyBB