coldfusion flash integration:
Hi,
In short, How can I get a <cfinput type="button" to send out a javascript
command to change the current page location.
I have this code:
When I click on the HTML type button, the relocation happens as expected.
When I click on the equivalent cfform button, it does not.
I'm guessing it is something in the syntax of the onClick event, but I have to
say I'm lost. Flash MX documentation says this should work right (?)
Cheers,
<script language="JavaScript">
function fred_DoFSCommand(command, arguments){
alert("Caught Command:" + command + " arguments:" + arguments);
var mytarget=parent.window.document.getElementById('mainarea');
if (command == "goURL") {
mytarget.src=arguments;
}
}
</script>
</head>
<body>
<form action="" name="freddy" id="freddy">
<input type="button" name="mybutton" id="mybutton" value="MyButton"
onClick="javascript:fred_DoFSCommand('goURL', '
http://news.bbc.co.uk');"
visible="Yes" enabled="Yes">
</form>
<cfform action="#self#" method="POST" target="mainarea" name="fred"
height="100" width="100" format="Flash" skin="haloBlue" id="fred">
<cfinput type="Button" name="mybutton" value="MyButton" visible="Yes"
enabled="Yes" onClick="{ fscommand('goURL', '
http://news.bbc.co.uk') };">
</cfform>