window.location.href issue in FireFox

  • Thread starter praveen.penupati
  • Start date
P

praveen.penupati

Hi All,

I've been facing problem with window.location.href in FF.
Here's my code:

var url = '/abc.php?_action=special&reason='+reasonCaptured
+'&title='+itemTitle+'&id='+itemId+'&uid='+userId
+'&posttype='+postType;
receiveReq.open("GET", url, true);
receiveReq.send(null);
var locationURL = window.location;
window.location.href = locationURL;

This works perfectly fine in IE.
In firefox the Ajax call is not made and the page simply reloads
without any action performed.
Any suggestions are greately helpful.

Thanks in advance,
Praveen.
 
M

Martin Honnen

var url = '/abc.php?_action=special&reason='+reasonCaptured
+'&title='+itemTitle+'&id='+itemId+'&uid='+userId
+'&posttype='+postType;
receiveReq.open("GET", url, true);
receiveReq.send(null);
var locationURL = window.location;
window.location.href = locationURL;

This works perfectly fine in IE.
In firefox the Ajax call is not made and the page simply reloads
without any action performed.

Consider to reload the document in the onreadystatechange handler of
your receiveReq object, once the readyState is 4.
 
G

GArlington

Hi All,

I've been facing problem with window.location.href in FF.
Here's my code:

var url = '/abc.php?_action=special&reason='+reasonCaptured
+'&title='+itemTitle+'&id='+itemId+'&uid='+userId
+'&posttype='+postType;
receiveReq.open("GET", url, true);
receiveReq.send(null);
var locationURL = window.location;
window.location.href = locationURL;
Why do you refresh the page in a first place?
The point of AJAX was to refresh/change data WITHOUT refreshing the
page...
This works perfectly fine in IE.
In firefox the Ajax call is not made and the page simply reloads
without any action performed.
Any suggestions are greately helpful.

Thanks in advance,
Praveen.
Just wait for AJAX response as Martin Honnen described and change the
values in the page...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top