all groups > coldfusion flash integration > november 2006 >
You're in the

coldfusion flash integration

group:

Problems using Javascript with Flash Forms


Problems using Javascript with Flash Forms REMWS
11/21/2006 7:32:00 PM
coldfusion flash integration:
I have a developed a flash form (using cfform) that I want to trigger a
javascript onClick event to call a function using a submit button. Whenever I
reference any function in the onClick event it will not compile.

Is this even possible to do?

Thanks,

Rob
Re: Problems using Javascript with Flash Forms CF_output
11/21/2006 8:01:15 PM
Re: Problems using Javascript with Flash Forms jensen.axel
11/21/2006 8:04:54 PM
I have the perfect answer for you!!!!!!

http://axel.cfwebtools.com/index.cfm/2006/11/2/Use-Javascript-in-flash-forms

i'm not sure if the link is going to work, it didn't when i previewed the
post... but just go to the blog, and search on "javascript" and it should come
up... its a really good post with example files


Re: Problems using Javascript with Flash Forms REMWS
11/21/2006 8:12:46 PM
Thanks, but using the GetURL function is an actionscript function that seems to
work fine with things like alert boxes.

I am trying to have it call a function that will submit the form. I have 2
submit buttons. One is to preview the information (which I want it to open in
a new window "target=_blank"). The other is to just submit it to the action
page without changing the target.

The sample function is attached.

I am calling it on the onClick event of the preview submit button.

Thanks,

Rob

function preview()
{
MyForm.action = "flashAction.cfm"
MyForm.target = "_blank";
MyForm.submit();
return true;
}
Re: Problems using Javascript with Flash Forms jensen.axel
11/21/2006 8:31:31 PM
I updated the page, go to "view example"

look at it... download the code...

play with it... use window.open in javascript...

Re: Problems using Javascript with Flash Forms REMWS
11/22/2006 4:35:04 PM
Thanks. I know it will work with pop ups as well but I can't get this type of
function to work. It has a problem with telling it to submit the form.




function preview()
{
MyForm.action = "flashAction.cfm"
MyForm.target = "_blank";
MyForm.submit();
return true;
}
AddThis Social Bookmark Button