CodeIgniter Forums
ajax error redirects to wrong url - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: ajax error redirects to wrong url (/showthread.php?tid=48000)



ajax error redirects to wrong url - El Forum - 12-31-2011

[eluser]adityajoshi[/eluser]
Code:
[removed]
function ajax(){
var ajaxRequest;  // The variable that makes Ajax possible!
var age = document.getElementById('author').value;
var queryString = "?age=" + age ;
var url = "http://localhost/feeders_1/index.php/blog/comment_insert/";
alert("arrived");
ajaxRequest.open("GET",url  , true);
ajaxRequest.send(null);
  }
[removed]

It redirects me to wrong url
http://localhost/feeders_1/?entry_id=4

any suggestion will be highly appreciated