HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 30th, 2000, 10:16 AM
Hideki Hideki is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Posts: 15 Hideki User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old September 30th, 2000, 01:24 PM
Eclipce Eclipce is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2000
Posts: 763 Eclipce User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 29 m 25 sec
Reputation Power: 0
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).]

Reply With Quote
  #3  
Old September 30th, 2000, 07:52 PM
Hideki Hideki is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Posts: 15 Hideki User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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/

Reply With Quote
  #4  
Old October 1st, 2000, 07:06 AM
Hideki Hideki is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Posts: 15 Hideki User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
And same thing happens with
location.replace &
location.assign.

------------------
http://millennium.massassi.net/

Reply With Quote
  #5  
Old October 2nd, 2000, 07:57 AM
JSchoof JSchoof is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 82 JSchoof User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 46 sec
Reputation Power: 9
Try

self.location.href = "http://blah.com";

Might work.

[This message has been edited by JSchoof (edited October 02, 2000).]

Reply With Quote
  #6  
Old October 2nd, 2000, 10:23 AM
Hideki Hideki is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Posts: 15 Hideki User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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/

Reply With Quote
  #7  
Old October 2nd, 2000, 02:35 PM
poggy poggy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: UK
Posts: 9 poggy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to poggy
I've always used window.location.href. It's worked fine for me. I think!


------------------
--
Mark Ogden

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > location.href?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway