471,825 Members | 1,149 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,825 software developers and data experts.

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 1195
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
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.