Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i edit the window.location.search value in netscape?

Status
Not open for further replies.

Petal

Programmer
Jun 8, 2001
56
NO
how can i edit the window.location.search value in netscape, and then reload the bare with another search value?

I have tried with
if(window.location.search=="?reload=true") {
window.location.search = ?reload=false&random= + Math.random();
window.location.reload(true);
}

tis will not work, the page are reloading with the old value..

Can anybody help me? PLEASE!!
 
hie!

i'm not shure, but try

if(window.location.search=="?reload=true") {
window.location.search ="?reload=false&random=+Math.random()";
window.location.reload(true);
}

& what is your random: id it defined? (u're writin random= + Math.random();)


but anyway, i dont think that u're able 2 do it this way, u shuld set search string 'after' href of needed page (u know, smth like href="blabla.html?reload=false&random=+Math.random()")

regards
 
You can't set a value with window.location.search. I think your script should look like this:

Code:
if(window.location.search == "mypage.html?reload=true") {
    window.location = "?reload=false&random=" +Math.random()";
}
----------
function new Programmer(name,age)
{
this.name = name;
this.age = age;
}

var steven = new Programmer('Steven',11);
 
Whoops, I messed up. I think the script should look like this:

Code:
if(window.location.search == "mypage.html?reload=true") {
    window.location = "mypage.html?reload=false&random=" + Math.random()";
} ----------
function new Programmer(name,age)
{
this.name = name;
this.age = age;
}

var steven = new Programmer('Steven',11);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top