Click to See Complete Forum and Search --> : get the url from the address bar
david_hemingway
April 29th, 2003, 12:05 PM
I'm building a site that runs in the search panel of IE and i'm trying to get the url from the main window, it's now starting to drive me nuts.
Has anybody got any ideas. i've tried javascript parent.location.href.
Cheers
Satishpp
April 29th, 2003, 04:59 PM
I am not sure about
building a site that runs in the search panel of IE
may be this will work
top.location.href
Satish
david_hemingway
April 30th, 2003, 03:59 AM
No it dosn't i've tried that. It looks like i have to use something along the lines of external.location.href but have never used this before and keeps returning errors, also found some stuff on the webBrowser.LocationURL but that's not clear and again all i'm getting is errors
nategrover
May 1st, 2003, 03:24 PM
try referencing the document i.e. parent.document.location.href or top.document.location.href
the "parent" and "top" refs are to window objects, which contain a document object . Window objects do not have an href property.
ketakimd
May 27th, 2003, 07:29 PM
I am new to Java Script.
Can you post the code to get URL from address bar?
I am working on project for blind people.
Thanks.
antares686
May 28th, 2003, 05:33 AM
Location is how you read the address. It has multiple options available to it so you need to lookup the details. In your case you use href to get the address. So based on this say you want to write the address inside your page when loaded you could do.
<html>
<body>
<script language=javascript>
document.write(location.href);
</script>
</body>
</html>
ketakimd
May 28th, 2003, 01:31 PM
Thanks a lot.
This works.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.