Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a value from an iFrame to work in FireFox?

Status
Not open for further replies.

nesplb

Programmer
Jul 29, 2003
109
NO
Hi!
I have a small web application that has a iFrame inside a form. Inside this Iframe there's a form which have a hidden value called "bulk".

How can I get this value from that form in the Iframe? In IE this works fine to get the value:

bulk = window.[NameOfIframe].[NameOfIframe's.form].[NameOfHiddenValue].value;

This doesn't work in FireFox. Is there a way to make it work in both FireFox and IE? Can I use "document.getElementById" for instance?

In Advance thanks:)


Pål Nesteby

PDC-Tangen
Norway
 
Thank you! Excellent:) Now it works, but my flash movie doesn't load when I try to run the following script on <body onload = onL()>

function onL(){


theObject = document.getElementById("obj1");
theObject.outerHTML = theObject.outerHTML;

}

Is there somehing with the script syntax that doesn't work in FireFox? The script is added so that the movie start automatically. It works in IE.

Pål Nesteby

PDC-Tangen
Norway
 
Sorry....I was posting wrong...I have those quotes...

<body onload="onL()">



Pål Nesteby

PDC-Tangen
Norway
 
Thank you!

I tried another approach to start the movie automatically....

The SWFObject.
It still works fine in IE, but not in FireFox...

Heres the code:

<script type="text/javascript" src="swfobject.js"></script>

<div id="flashcontent">
This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
so.write("flashcontent");
</script>

Is there something wrong with this script?


Pål Nesteby

PDC-Tangen
Norway
 

I found the error!

almost too easy to post here...hehe

The path to the script was wrong!

Thanks for all help!
This really saved the day:D

Pål Nesteby

PDC-Tangen
Norway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top