PDA

View Full Version : iframe and java


plus
11-13-2005, 05:15 PM
Hi,

How can I do an if statement to see which html file is loaded into an iframe using javascript?

I've tried something like:

if( parent.body.location == 'contact us.html')

Where body is the name of the iframe. I also tried with 1 = which worked but it also actually changed the iframe to contact us.html.

Thankd for any help.

_Aerospace_Eng_
11-13-2005, 05:19 PM
You shouldn't use body. Body is a reserved word in Javascript. Use something like main for the name of the iframe. Java is not javascript btw.

plus
11-13-2005, 05:45 PM
Ok thanks for the info.