Question
initiate javascript in coldfusion
I am trying to modify an exisiting javascript applicaion. One
of the parts
in manually entering the url for an image. I would like to change that from
manually to allowing for an image to be uploaded. The form is set to:
<form action="#" enctype="multipart/form-data"
onSubmit="insertAction();return false;">
I would like to set up a code block to first upload the image, then set the
formObj.scr to a set value plus the image that was uploaded.
I have this:
<cfif IsDefined ('insert')>
<cffile action="upload" destination="E:\www\mailings\images"
nameconflict="makeunique" filefield="src" >
<cfset src = " http://www.mywebsite.com/mailings/images/#cfile.serverFile#">
</cfif>
From there I want to then initiate the Javacript (insertAction();return
false)that will finish the routine and insert it into my html WYSIWYG.
I have searched google and could not find any ideas.
Is this possible?
in manually entering the url for an image. I would like to change that from
manually to allowing for an image to be uploaded. The form is set to:
<form action="#" enctype="multipart/form-data"
onSubmit="insertAction();return false;">
I would like to set up a code block to first upload the image, then set the
formObj.scr to a set value plus the image that was uploaded.
I have this:
<cfif IsDefined ('insert')>
<cffile action="upload" destination="E:\www\mailings\images"
nameconflict="makeunique" filefield="src" >
<cfset src = " http://www.mywebsite.com/mailings/images/#cfile.serverFile#">
</cfif>
From there I want to then initiate the Javacript (insertAction();return
false)that will finish the routine and insert it into my html WYSIWYG.
I have searched google and could not find any ideas.
Is this possible?