Re: JS back?
why don;t you write them to the session, and then when you relocate back, have the session fill the values... simple and easy... have had to do that with multipage forms before HTH TOM - Original Message - From: "Greg" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, March 20, 2002 4:06 PM Subject: JS back? > 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: > > FILEFIELD="photo" > > DESTINATION="D:/wserver/ediets/myediets/profile/photos/#form.username#" > NAMECONFLICT="OVERWRITE" > ACCEPT="image/gif, image/jpg, image/jpeg, > image/pjpeg"> > > > > > 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()? > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: JS back?
You will have problems with this method in NN. What I have done in the past is the same code, but throwing into a function and having the onload event trigger it. EXAMPLE: .. Redirecting, Please Wait <!-- function goBack(){ var msg = "The file was too large, please select another file."; history.go(-1); } //--> Hope this helps! -- SCOTT VAN VLIET SENIOR ANALYST SBC SERVICES, INC Tel: 858.886.3878 Fax: 858.653.6763 Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> -Original Message- From: Joel Firestone [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:18 AM To: CF-Talk Subject: Re: JS back? How about: . alert("Your file is too big!"); history.back(); HTH Joel - Original Message - From: "Greg" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, March 20, 2002 11:06 AM Subject: JS back? > 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: > > FILEFIELD="photo" > > DESTINATION="D:/wserver/ediets/myediets/profile/photos/#form.username#" > NAMECONFLICT="OVERWRITE" > ACCEPT="image/gif, image/jpg, image/jpeg, > image/pjpeg"> > > > > > 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()? > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: JS back?
You should be able to accomplish this by placing the following in your block (replacing what you have there now: alert(Your file is too big!); history.back(); -Original Message- From: Greg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 11:06 AM To: CF-Talk Subject: JS back? 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: 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()? __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: JS back?
How about: .. alert("Your file is too big!"); history.back(); HTH Joel - Original Message - From: "Greg" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, March 20, 2002 11:06 AM Subject: JS back? > 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: > > FILEFIELD="photo" > > DESTINATION="D:/wserver/ediets/myediets/profile/photos/#form.username#" > NAMECONFLICT="OVERWRITE" > ACCEPT="image/gif, image/jpg, image/jpeg, > image/pjpeg"> > > > > > 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()? > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists