|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I didn't know "location.href" was kind of temporarily changed address.
I did this in the script. Current address is on the hard drive. (file://blah_blah) <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> newAddress = 'http:blah_blah'; location.href = newAddress; alert(location.href); [/code] Now I get "file://blah_blah" printed out! Though the page is showing on the "http:". And since after this, any other function getting the "location.href" will have access denied error... Does anyone know how to change the url of a page definately through JavaScript? or am I just missing something? |
|
#2
|
|||
|
|||
|
It should be http://bla_bla not http:bla_bla
------------------ 2 Samuel 7:10 Moreover I will appoint place for my people Israel, and will plant them, that they may dwell in a place of their own, and move no more; neither shall the children of wickedness afflict them any more, as beforetime, [This message has been edited by Eclipce (edited September 30, 2000).] |
|
#3
|
|||
|
|||
|
That's not the point.
I have the addresses pointed correctly to either on harddisk drive and to the internet. The problem is if I change the url of a page by "location.href" and then just do "location.reload()", the address goes back to the old one... So, it's kind of temprarily changing, but once you reload the page again with location.reload, it's going back, this kind of mess refuses "userValue = location.href" from working and gives me access denied. Hitting reload button on the browser doesn't do this though. Anyone know how to overcome this in other ways etc? ------------------ http://millennium.massassi.net/ |
|
#4
|
|||
|
|||
|
And same thing happens with
location.replace & location.assign. ------------------ http://millennium.massassi.net/ |
|
#5
|
|||
|
|||
|
Try
self.location.href = "http://blah.com"; Might work. [This message has been edited by JSchoof (edited October 02, 2000).] |
|
#6
|
|||
|
|||
|
In the exact situation, I have it
opener.location.href = whereverAddress; And I'm 100% positive that "opener" value is kept fine and keeps the opener window value and it does change the opener location. Anything else that might work? ------------------ http://millennium.massassi.net/ |
|
#7
|
|||
|
|||
|
I've always used window.location.href. It's worked fine for me. I think!
------------------ -- Mark Ogden |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > location.href? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|