tinabme
07-19-2002, 01:53 PM
Hello,
I am trying to update an iframe when the user makes a selection from a select box.
I don't have any trouble with changing the iframe, but when I try to send a varible as a quey string, the variable doesn't pass to the iframe properly.
// this is in my header, and it is initiated from the onchange below.
// it changes the page fine, but doesn't read the varible "num"
// that was passed to the function
<script language="javaScript">
<!--
function updatenotes (num) {
document.getElementById("desc").src = 'iframe1.cfm?dec=num'
}
//-->
</script>
// this is the select box that initiates the function from onchange
// for simplicities sake, I hard coded 3 options, but in reality,
// these options are ever changing
<select name="Description" onchange="updatenotes(this.options[selectedIndex].value)">
<option name="">Select a project</option>
<option name="2" >project2</option>
<option name="3" >project3</option>
</select>
Any help you can offer would me ver appreciated.
thanks
I am trying to update an iframe when the user makes a selection from a select box.
I don't have any trouble with changing the iframe, but when I try to send a varible as a quey string, the variable doesn't pass to the iframe properly.
// this is in my header, and it is initiated from the onchange below.
// it changes the page fine, but doesn't read the varible "num"
// that was passed to the function
<script language="javaScript">
<!--
function updatenotes (num) {
document.getElementById("desc").src = 'iframe1.cfm?dec=num'
}
//-->
</script>
// this is the select box that initiates the function from onchange
// for simplicities sake, I hard coded 3 options, but in reality,
// these options are ever changing
<select name="Description" onchange="updatenotes(this.options[selectedIndex].value)">
<option name="">Select a project</option>
<option name="2" >project2</option>
<option name="3" >project3</option>
</select>
Any help you can offer would me ver appreciated.
thanks