Thanks so much Gerald, and you are going to either laugh or say "What an idiot" when you hear this.
The reason it wasn't working is because the lines broke and I had forgotten that vbscript trips on that. Thanks for all of your time and help. It is greatly appreciated. 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] 09/12/02 03:26 AM >>> Sorry I didn't test it ... Just replace the current sub by: sub ModPicture(ImageType) if ImageType <> "none" then result = window.showModalDialog("MD_ModPicture.cfm?ImageType=" & ImageType,,"dialogWidth:20;dialogHeight:20") if result = "" then exit sub else document.all.New_Book_Image.value = result end if else exit sub end if end sub -----Original Message----- From: Candace Cottrell [SMTP:[EMAIL PROTECTED]] Sent: 12 September 2002 01:52 To: CF-Talk Subject: RE: Stuck Building Admin Area (modal Windows) Gerald, at your suggestion, I tried to implement the modal window. Thanks for all your help. I'm not sure why, but I keep getting a VB Script error on the first page where the End Sub is. I have to admit it's been years since I've worked with VBScript ;) Any help would be greatly appreciated. form page: <script language="VBScript"> sub ModPicture(ImageType) if ImageType = "none" then exit sub result = window.showModalDialog("MD_ModPicture.cfm?ImageType=" & ImageType,,"dialogWidth:20;dialogHeight:20") if result = "" then exit sub else document.all.New_Book_Image.value = result end if end sub </script> <select name="ImageType" onChange="ModPicture(this.options[this.selectedIndex].value)"> <cfoutput query="getNewBook"> <cfif New_Book_Image Contains "http://images.amazon.">; <option value="amazon" selected>Amazon</option> <option value="None"> No Image</option> <option value="Upload">Upload</option> <cfelseif New_Book_Image IS "None"> <option value="amazon" selected>Amazon</option> <option value="None" selected> No Image</option> <option value="Upload">Upload</option> <cfelse> <option value="amazon" selected>Amazon</option> <option value="None"> No Image</option> <option value="Upload" selected>Upload</option> </cfif> </cfoutput> </select> modal: <html> <title>Modal</title> <script language="VBScript"> sub Save window.returnValue = window.document.all.New_Book_Image.value window.close() end sub sub Cancel window.returnValue = "" window.close() end sub </script> <link href="../apooo.css" rel="stylesheet" type="text/css"> <table> <cfswitch expression="#url.ImageType#"> <cfcase value="amazon"> <tr> <td><span class="tealHeader">Amazon link</span><br> </td> <td><span class="copyTeal">Type the Image URL:</span> <input type="text" name="New_Book_Image"></td> </tr> </cfcase> <cfcase value="Upload"> <tr> <td>Attachment</td> <td><input type="file" name="Image"></td> </tr> </cfcase> </cfswitch> <tr> <td colspan="2" align="center"> <input type="button" value="Save" onClick="Save"> <input type="button" value="Cancel" onClick="Cancel"> </td> </tr> </table> </html> 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] ______________________________________________________________________ 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/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

