Click to See Complete Forum and Search --> : Firefox IFrame Problem


meirgazit
03-05-2007, 05:55 AM
:) hi ,

I use javascript in a site I build and I have an IFrame and a navigation bar in my index.asp page. when user click on the bar I call the same page and use document.getElementById to get the IFrame and to change it's src, so far so good - if you use IE, if you use firefox the story is different - if you click on the navBar it will loads the index.asp inside the IFrame instead of load the page I expect to load.

I don't understand :confused: why it is happening.....

:D Any halp will be appreciated !!! :D

KDLA
03-05-2007, 11:37 AM
You really don't need javascript to do that. You can name the target (the iframe) in each of your navigation menu's link tags:
<a href="file.htm" target="myframe">File</a>
...
<iframe name="myframe"></iframe>

meirgazit
03-05-2007, 12:02 PM
yap I know, you will not believe it, I got this site to adjust it between IE and firefox and when I open the html pages look what I see : <td height="20px" linkAdd="SuccessStories.asp" onclick="javascript:MClick(this);"> they put all the links inside of the <td> what can I tell you !

The javascript on the top is very simple : <script language='javascript'>function MClick(obj){document.frames('MainContent').src = obj.linkAdd;}</script>

now, it is really working with IE, this browser parser is amazing, it is like Perinea fish it is eating everything but other browser will crash with it.

any suggestions ? I'm confuse :eek: here.