471,091 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,091 software developers and data experts.

workalike for top.location.watch("href",fn) in IE?

I'd like to set up a bit of javascript to be run when other javascript
loads a new page via something like { top.window.location.href =
newLocation }, and have access to the new value. (For example, so that
the target URL can be modified before fetching.)

In Mozilla, top.location.watch("href",fn) works well for this purpose.

In IE, neither watch() nor an onpropertychange handler set on
top.window.location work.

Any tricks to making this work? Any alternate approaches I should
consider.

Any help appreciated. Thanks,

- Gordon @ IA
Jul 23 '05 #1
3 3116
Gordon Mohr wrote:
I'd like to set up a bit of javascript to be run when other javascript
loads a new page via something like { top.window.location.href =
newLocation }, and have access to the new value. (For example, so that
the target URL can be modified before fetching.) In Mozilla, top.location.watch("href",fn) works well for this purpose. In IE, neither watch() nor an onpropertychange handler set on
top.window.location work. Any tricks to making this work? Any alternate approaches I should
consider.
A> ny help appreciated. Thanks,
- Gordon @ IA


Maybe...

http://msdn.microsoft.com/library/de...p/author/dhtml
/reference/events/onbeforeunload.asp

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #2
On Sat, 04 Dec 2004 01:44:08 GMT, Rob B <fe******@hotmail.com> wrote:

[snip]
http://msdn.microsoft.com/library/de...p/author/dhtml
/reference/events/onbeforeunload.asp


It's best to surround long URLs with <URL:...>. This tends to stop line
feeds from breaking them. Also, those particular MSDN URLs containing
/library/default.asp?url= rely on use of the tree on the left-hand side
which isn't compatible with all browsers. Removing that part, producing

<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeunload.asp>

will take you to the right page regardless of what browser is used.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #3
"Michael Winter" <M.******@blueyonder.co.invalid> wrote in message news:<opsihgyumfx13kvk@atlantis>...
On Sat, 04 Dec 2004 01:44:08 GMT, Rob B <fe******@hotmail.com> wrote:

[snip]
http://msdn.microsoft.com/library/de...p/author/dhtml
/reference/events/onbeforeunload.asp


It's best to surround long URLs with <URL:...>. This tends to stop line
feeds from breaking them. Also, those particular MSDN URLs containing
/library/default.asp?url= rely on use of the tree on the left-hand side
which isn't compatible with all browsers. Removing that part, producing

<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeunload.asp>

will take you to the right page regardless of what browser is used.

Mike


Thanks Mike!
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Erik T. Nomad | last post: by
27 posts views Thread by Abdullah Kauchali | last post: by
1 post views Thread by =?Utf-8?B?Sm9obg==?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.