1 Reply Latest reply on Oct 9, 2006 8:12 AM by Newsgroup_User

    initiate javascript in coldfusion

    Level 7
      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#">

      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?