I have the html/javascript posted below, I imagine the fix to my problem is something simple that I am overlooking. My script is a little bit of html and javascript, and there is an embedded flash file written in actionscript. This is a test page, and I am furious that it is posing such a problem.
I am communicating between the html and flash object. My goal is to populate the flash object textbox with the value of the html combobox (I know this is silly, but again its a test that is going to lead up to a much more involved project).
So, the javascript below works to a certain extent...
The problem is with the line: var testVar = document.myForm .department.val ue;
I want the variable, testVar, to equal the value of which ever option the user selects from the combobox. The way it is setup now, the variable will not update! (it will only send the initial value to flash i.e. "Accounting ").
Check it out online! http://www.dajunkyard.com/USGtestser...ceExample.html
[CODE=html]<body>
<form name="myForm">
<TR>
<TD>Department: </TD>
<TD>
<SELECT NAME="departmen t">
<option value="accounti ng">Accountin g</option>
<option value="human_re sources">Human Resources</option>
<option value="informat ion_technology" >Information Technology</option>
<option value="marketin g">Marketing </option>
<option value="sales">S ales</option>
<option value="support staff">Support Staff</option>
</select>
</form>
</TD>
</TR>
<form>
<input type="button" onclick="callEx ternalInterface ()" value="Call ExternalInterfa ce" />
</form>
<script>
var testVar = document.myForm .department.val ue;
function callExternalInt erface() {
thisMovie("exte rnalInterfaceEx ample").goHome( testVar);
}
function thisMovie(movie Name) {
if (navigator.appN ame.indexOf("Mi crosoft") != -1) {
return window[movieName]
}
else {
return document[movieName]
}
}
</script>
<object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" id="externalInt erfaceExample" codebase="http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=7,0,19,0" width="550" height="400">
<param name="movie" value="test.swf " />
<param name="quality" value="high" />
<embed src="test.swf" name="externalI nterfaceExample " quality="high" pluginspage="ht tp://www.macromedia. com/go/getflashplayer" type="applicati on/x-shockwave-flash" width="550" height="400"></embed>
</object>
</body>[/CODE]
I am communicating between the html and flash object. My goal is to populate the flash object textbox with the value of the html combobox (I know this is silly, but again its a test that is going to lead up to a much more involved project).
So, the javascript below works to a certain extent...
The problem is with the line: var testVar = document.myForm .department.val ue;
I want the variable, testVar, to equal the value of which ever option the user selects from the combobox. The way it is setup now, the variable will not update! (it will only send the initial value to flash i.e. "Accounting ").
Check it out online! http://www.dajunkyard.com/USGtestser...ceExample.html
[CODE=html]<body>
<form name="myForm">
<TR>
<TD>Department: </TD>
<TD>
<SELECT NAME="departmen t">
<option value="accounti ng">Accountin g</option>
<option value="human_re sources">Human Resources</option>
<option value="informat ion_technology" >Information Technology</option>
<option value="marketin g">Marketing </option>
<option value="sales">S ales</option>
<option value="support staff">Support Staff</option>
</select>
</form>
</TD>
</TR>
<form>
<input type="button" onclick="callEx ternalInterface ()" value="Call ExternalInterfa ce" />
</form>
<script>
var testVar = document.myForm .department.val ue;
function callExternalInt erface() {
thisMovie("exte rnalInterfaceEx ample").goHome( testVar);
}
function thisMovie(movie Name) {
if (navigator.appN ame.indexOf("Mi crosoft") != -1) {
return window[movieName]
}
else {
return document[movieName]
}
}
</script>
<object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" id="externalInt erfaceExample" codebase="http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=7,0,19,0" width="550" height="400">
<param name="movie" value="test.swf " />
<param name="quality" value="high" />
<embed src="test.swf" name="externalI nterfaceExample " quality="high" pluginspage="ht tp://www.macromedia. com/go/getflashplayer" type="applicati on/x-shockwave-flash" width="550" height="400"></embed>
</object>
</body>[/CODE]
Comment