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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iframe working with firefox or safari

Status
Not open for further replies.

stax

Technical User
Sep 25, 2002
81
US
Hi,

I have an iframe set inside a table that loads html from an external text file. It works in IE but not firefox or safari, is this command just for IE?

<iframe name="div_products" scrolling=no frameBorder=0 width="152" height="24"></iframe>
<script
language="JavaScript">
frames['div_products'].location.href=' </script>


Can anyone shed any light on this?
S
 
Why are you doing that? It would be much simpler (and correct iframe syntax) if you did it right:
Code:
<iframe name="div_products" scrolling="no" frameBorder="0" width="152" height="24" src="[URL unfurl="true"]http://www.digital-redux.com/div_products.txt"></iframe>[/URL]
I would guess your javascript uses IE proprietary collections, which makes it not work.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Thanks Vragabond, i correct that, the reason i was doing it that way was because i followed a tutorial on iframe. It still doesnt work in mozilla browser though, so is iframe not compatable with those browsers?
 
I think I know what your problem is. IE appears to render the Select box from your text file correctly. It doesn't care its a text file. However Firefox, knows its text and as such ignores the HTML in it, and just displays it as is.

Try changing the extension of your file div_products.txt to div_products.html.

That way both browsers will render it correctly.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Hi Vacunita,
Thats great you nailed it, its working perfectly now!! Much apprieciated
S
 
You're welcome, glad I could help.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top