So here is the basic Code..
Suppose we have a form with 100 fields. out of that 100 fields we have one field for upload. Now we will fill that fields and then click browse to Upload a file also and when we click Submit, we may encounter any kind of Error..
I/O Error
File Unknown Error and many others.
So our whole filling up the form goes to dump..
Now we can do it in simple way:
Suppose we want to upload an image..
now first we see that if that image already exists, if yes we will display it like this:
<cfif headerLogo IS NOT "">
<tr>
<td class="middleright"><stron
<td><cfoutput><img src="headers/#headerLogo#"
</tr>
</cfif>
<tr>
<td class="middleright"><stron
<td><cfinput type="text" name="headerLogo" id="headerLogo" tabindex="3" class="inputstyle" value="#headerLogo#"> 
</tr>
now if the headerLogo is not defined, or it does not exists, we will use the following cfinput tag which have an ADD iMAGE button located next to it which will open the POPUP Window and we will be doing the upload there..
Javascript we used is this:
function WinOpen(url,x,y) {
var attributes = "toolbar=no,scrollbars=yes
msgWindow=window.open(url,
}
if ( !WinOpen ){
alert('You must disable your popup blocker for this website to allow you to login!');
}
Now we have one JS File which check for the file upload extention and that is below:
Now next we will see our UPLOAD.CFM Page
Now Action Page:
now in closex.cfm we do the following:
<tr>
<td width="15%" align="left"><cfif refindnocase('error',#ToSt
<a href="javascript:void(0);"
<cfelse>
</cfif></td>
<td width="85%" align="right"><cfoutput> <a href="javascript:void(0);"
</tr>
a notification is displayed and parent page is refreshed and image is uploaded and now you can go through the form fields filling up!
There is lot more that can be done to enhance this tute! Many options still await like watermark, shadow and much much more!
So keep Coding and Happy Coding..
Please contact me for any Updates on the issue!