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

[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
#2

[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.
#3

[eluser]John_Betong[/eluser]
 
I am just getting into jQuery, etc and had a similar problem.

Google for more info on the script below.

Code:
// ESSENTIAL: Must FIRST load Prototype then Scriptaculous then jQuery.
  [removed]
    jQuery.noConflict();
    ...
  [removed]
 
 
 
#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.
#5

[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:
http://www.4shared.com/file/145312935/50...pping.html

Pls Help me I am waiting your Reply.

With Thanks

Anes
#6

[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

Regards
Anes P.A




Theme © iAndrew 2016 - Forum software by © MyBB