Skip to main content
Inspiring
October 9, 2006
Question

initiate javascript in coldfusion

  • October 9, 2006
  • 1 reply
  • 247 views
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?


This topic has been closed for replies.

1 reply

Inspiring
October 9, 2006
Nevermind. Figured it out.