Welcome Guest, Not a member yet? Register   Sign In
URI Problem with Ajax and jQuery
#2

[eluser]mah0001[/eluser]
Don't use relative paths. Try creating a js variable to hold the site url e.g.
Code:
[removed]
   var CI = {'base_url': '<?php echo site_url(); ?>'};
[removed]

and in your js, use the base_url to create full path.

Code:
if(data == 1){`window`.`location`.replace(CI.base_url+'/server/redirect_to_game/'+server_id);}


Messages In This Thread
URI Problem with Ajax and jQuery - by El Forum - 04-28-2010, 10:38 AM
URI Problem with Ajax and jQuery - by El Forum - 04-28-2010, 06:16 PM
URI Problem with Ajax and jQuery - by El Forum - 04-28-2010, 08:26 PM
URI Problem with Ajax and jQuery - by El Forum - 04-28-2010, 09:36 PM
URI Problem with Ajax and jQuery - by El Forum - 04-28-2010, 09:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB