469,356 Members | 2,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

problems with a script in FF

Maybe I am just blind. The following http://cresslawnprimary.co.za/news.html
works in IE and Opera fine. I can change via the pull down the news
and it works. But in FireFox it just does not work and the error I see
in Firebug is:

parent.frames.XYZ1 has no properties
http://cresslawnprimary.co.za/drop.html?
Line 7
the code looks as follows:
function gotourl( mySelect ) {
myIndex = mySelect.selectedIndex;
myValue = mySelect.options[myIndex].value;
parent.frames.XYZ1.location=myValue;
}

function gotour2(Ref1) {

myElem=document.getElementById("SelBox1");
myElem.selectedIndex = Ref1 ;
myValue = myElem.options[Ref1].value;
parent.frames.XYZ1.location=myValue;

}

</script>

<title></title>
</head>

<body>
Select newsletter to view: &nbsp; &nbsp; &nbsp; Latest: &nbsp;
&nbsp; &nbsp; <a href="javascript:gotour2(0)">17 May 2007</a&nbsp;
&nbsp; &nbsp; <a href="javascript:gotour2(1)">03 May 2007</a>
&nbsp; &nbsp; &nbsp; <a href="javascript:gotour2(2)">18 Apr 2007</a>
&nbsp; &nbsp; &nbsp; All: &nbsp; &nbsp; &nbsp; <select id="SelBox1"
onchange="gotourl(this)">
<option value="NewsLetters/17 May 2007.html" selected>
17 May 2007
</option>

<option value="NewsLetters/03 May 2007.html">
03 May 2007
</option>

<option value="NewsLetters/18 Apr 2007.html">
18 Apr 2007
</option>

<option value="NewsLetters/15 Mar 2007.html">
15 Mar 2007
</option>

<option value="NewsLetters/01 Mar 2007.html">
01 Mar 2007
</option>

<option value="NewsLetters/16 Feb 2007.html">
16 Feb 2007
</option>

<option value="NewsLetters/01 Feb 2007.html">
01 Feb 2007
</option>

<option value="NewsLetters/18 Jan 2007.html">
18 Jan 2007
</option>
</select>
</body>
</html>
Any ideas, where I am blond in regards to the script

Thx,

Marcus

May 23 '07 #1
3 1158
ti********@gmail.com wrote:
Any ideas, where I am blond in regards to the script
The reference to parent.frames.XYZ1 is invalid, because a) you are not
working in frames, and b) you didn't give the document the name XYZ1.
JW
May 23 '07 #2
there was one more file to go with it:

news.html

<html>
<head>
<Title>Cresslawn Primary Newsletters</Title>
</head>
<frameset rows=130,30,*>
<frame frameborder=10 src="head.html?" </frame>
<frame marginheight=0 frameborder=0 src="drop.html?" </frame>
<frame id="XYZ1" marginheight=0 frameborder=0 src="NewsLetters/17 May
2007.html"
</frame>
</frameset>
</html>

what realy cobfuses me is the fact it runs in Opera and IE..

May 24 '07 #3
TinyHunter wrote:
what realy cobfuses me is the fact it runs in Opera and IE..
Change ``<frame id="XYZ1" '' into ``<frame name="XYZ1" ''; Both Opera and IE
probably use the id in absence of a name attribute.
JW
May 26 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

55 posts views Thread by drhowarddrfine | last post: by
2 posts views Thread by robert.waters | last post: by
2 posts views Thread by Jeronimo Bertran | last post: by
10 posts views Thread by Danny | last post: by
2 posts views Thread by goodnamesalltaken | last post: by
3 posts views Thread by PCgeek | last post: by
10 posts views Thread by jodleren | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.