[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling location.href from another windows

>I got stuck with such problem:
>I need to control url of one frame from another and resulting different
>actions. What is wrong with this code?
>If ((window.frames[1].location==" url here ") 
> { document.write('<IMG SRC="cbullet.gif">'); }
>else {document.write('<IMG SRC="bullet.gif">');}
>anybody got idea? I wanna put one icon if the url for frame 1 is correct, 
>and another if wrong.

Try window.frames[1].location.href instead of window.frames[1].location or
any other property of the object location: hash, host, hostname, href,
pathname, port, protocol or search.

For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/