macromedia.coldfusion.flash_integration
[Top] [All Lists]

Flash Form and Navigation Button Issue (DoFSCommand)

Subject: Flash Form and Navigation Button Issue (DoFSCommand)
From: "bryn50" <webforumsuser@xxxxxxxxxxxxxx>
Date: Fri, 20 Jul 2007 17:20:36 +0000 (UTC)
Newsgroups: macromedia.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>


<Prev in Thread] Current Thread [Next in Thread>