I'm testing for file size after posting a form. Is there a way to use
javascript:history.back() to send me back to the form instead of having
to pass all the form values back in the url of cflocation? (Also don't
want to do the wddx thing because I have to use
enctype="multipart/formdata" to submit the input type="file", and the
only way I know to serialize the form data is to loop over the
form.fieldnames and it in a structure. And with
enctype="multipart/form-data" form.fieldnames plays out as the VALUES
instead of the actual fieldnames.) I tried this:
<cfif cgi.content_length LTE 10000><!---set for files 50k or less --->
<cffile ACTION="Upload"
FILEFIELD="photo"
DESTINATION="D:/wserver/ediets/myediets/profile/photos/#form.username#"
NAMECONFLICT="OVERWRITE"
ACCEPT="image/gif, image/jpg, image/jpeg,
image/pjpeg">
<cfelse>
<cfset message="Your file is too big!">
<body onload="javascript:history.back()"></body>
</cfif>
But it's sloppy. Any javascripters know if I could have an alert box to
display the message. Then after you click OK it could do the
javascript:history.back()?
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists