Candace, One warning if you don't use Greg's very good suggestion: if you stick with the dropdown list approach, be sure to test whatever you use in both Netscape and IE. I had a somewhat similar check taking place and was unable to get the JavaScript to check the value of the dropdown list onSubmit in Netscape. I still plan to go back to it for another try, but I currently have that check disabled in Netscape and let what used to be redundant server-side scripting handle the validation.
Matthieu -----Original Message----- From: Candace Cottrell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 8:30 AM To: CF-Talk Subject: RE: Stuck Building Admin Area Thanks for the reply, Greg. I like your idea, and I'll definitely let you know how it goes. :) Candace K. Cottrell, Web Developer The Children's Medical Center One Children's Plaza Dayton, OH 45404 937-641-4293 http://www.childrensdayton.org [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 9/11/2002 8:17:32 AM >>> Candace, Sounds like some tricky javascript, but surely can be done. You're saying if you choose "upload new photo" it could open a small window with a form that has a file upload form. If they choose "Add New Link" it would open a small window with a single textbox to submit a link...is that what you're thinking? I would try it a simpler way and just display the imagetype, and probably display the image so you can see what you're dealing with. Then have 3 radio buttons, New Image, New Link, and None. Then to the right of the radio button you'd have a file upload input for the New Image. A textbox for the new link, and nothing for the "None". See what I mean? If you choose the new image button then the next page will accept the file you uploaded. You should incorporate some validation on the backend to send you back with a message if the form is submitted with "New Image" selected but no value in the file upload etc. Let me know what you come up with. Greg -----Original Message----- From: Candace Cottrell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 7:32 PM To: CF-Talk Subject: Stuck Building Admin Area Hello all you illustrious CF gurus. I am having a problem deciding on how to arrange an edit app for an admin area. I've got it all under control excpet for one thing: The image Basically, the user can edit the book title, book author, etc. When they add the book to the db, they select whether the image is an amazon link, no image, or an upload. Now when they go to edit the book, I want to give them the option of changing the image type, uploading a new photo, or changing it to "No Image". I have a dropdown that is selected based on what's in the db for that book. <select name="ImageType"> <cfoutput query="getNewBook"> <cfif New_Book_Image Contains "http://images.amazon."> <option value="amazon" selected>Amazon</option> <cfelseif New_Book_Image IS "None"> <option value="None" selected> No Image</option> <cfelse> <option value="Upload" selected>Upload</option> </cfif></cfoutput> </select> Ok, now I have two issues. Number one, I can see that my logic is off for the dropdown. Only one of the options is showing up. I can probably fix that. The other issue is how do I allow them to change the image type, and then based on which type they choose, open up a dialog box that will allow them to add a link or upload a new file, and then post it back to my form page? I know a former co-worker was using modal windows to do a similar thing. Is this an option for me? I'm still fairly green (almost like a sage color) to cf and programming in general, and hate to bug you all about these simple things :) I appreciate any help or insight you may be able to direct my way. Candace K. Cottrell, Web Developer The Children's Medical Center One Children's Plaza Dayton, OH 45404 937-641-4293 http://www.childrensdayton.org [EMAIL PROTECTED] ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.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

