steve55
09-05-2002, 11:20 AM
Hi,
I have found a great script at http://www.draac.com/dropdown-menu-iframe.html which I am playing around with.
However I can't get the background colour of the frame to be anything other than white - even if I specify a colour in the <IFRAME> tag...
Is there a way of amending this in the javascript? The code is as follows:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function leapto(form) {
var myindex=form.dest.selectedIndex
parent.SURFCAMS.location.href=(form.dest.options[myindex].value);
// You can output to ANY frame using: parent.[framename].location.href
}
// End -->
</SCRIPT>
</HEAD>
<FORM NAME="myform">
<SELECT NAME="dest" SIZE=1 onChange="leapto(this.form)">
<OPTION SELECTED VALUE="">Choose A Link
<OPTION VALUE="http://www.lycos.com/">Lycos.Com
<OPTION VALUE="http://www.google.com/">Google.Com
<OPTION VALUE="http://www.yahoo.com/">Yahoo.Com
</SELECT>
</FORM>
<iframe width="650" height="400" name="CONTENT" bgcolor="#003366">
-----------------------------
</iframe>
I have found a great script at http://www.draac.com/dropdown-menu-iframe.html which I am playing around with.
However I can't get the background colour of the frame to be anything other than white - even if I specify a colour in the <IFRAME> tag...
Is there a way of amending this in the javascript? The code is as follows:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function leapto(form) {
var myindex=form.dest.selectedIndex
parent.SURFCAMS.location.href=(form.dest.options[myindex].value);
// You can output to ANY frame using: parent.[framename].location.href
}
// End -->
</SCRIPT>
</HEAD>
<FORM NAME="myform">
<SELECT NAME="dest" SIZE=1 onChange="leapto(this.form)">
<OPTION SELECTED VALUE="">Choose A Link
<OPTION VALUE="http://www.lycos.com/">Lycos.Com
<OPTION VALUE="http://www.google.com/">Google.Com
<OPTION VALUE="http://www.yahoo.com/">Yahoo.Com
</SELECT>
</FORM>
<iframe width="650" height="400" name="CONTENT" bgcolor="#003366">
-----------------------------
</iframe>