tomliuwhite Posted March 29, 2006 Posted March 29, 2006 I go to Admin->Catalog->Catagories/Products->Products Description and add the below code: <script> <!-- function openWindow() { window.open("upload/2.php", "", "height=305, width=550, status=yes, toolbar=yes, menubar=no, location=no resizable= yes"); } //--> </script> <img src="upload/botton.gif" onClick="openWindow()"> After i update it, i go back to look at it, it is changed to: <script> <!-- function openWindow() { window.open(\"upload/2.php\", \"\", \"height=305, width=550, status=yes, toolbar=yes, menubar=no, location=no resizable= yes\"); } //--> </script> <img src=\"upload/botton.gif\" onClick=\"openWindow()\"> If i update it again, then i go back to look at it, it is changed again to: <script> <!-- function openWindow() { window.open(\\\"upload/2.php\\\", \\\"\\\", \\\"height=305, width=550, status=yes, toolbar=yes, menubar=no, location=no resizable= yes\\\"); } //--> </script> <img src=\\\"upload/botton.gif\\\" onClick=\\\"openWindow()\\\"> It is so stranged. How can i fix this problem? Many thanks in advance.
Epic Mike Posted March 29, 2006 Posted March 29, 2006 What are you using to edit your files? It appears that program is adding the \ before the " automatically. there's probably a setting to turn that off.
tomliuwhite Posted March 29, 2006 Author Posted March 29, 2006 What are you using to edit your files? It appears that program is adding the \ before the " automatically. there's probably a setting to turn that off. I just go to Admin->Catalog->Catagories/Products->Products Description and paste the below code. I program the source code in Dreamweaver and then i copy/paste.
Wendy James Posted March 29, 2006 Posted March 29, 2006 Id you are using the file manager to edit your page, don't. Files that need to be edited should be downloaded to your hard drive, edited then reuploaded. If you are doing that, then like Mike asked... what program are you using to edit? Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
tomliuwhite Posted March 29, 2006 Author Posted March 29, 2006 Id you are using the file manager to edit your page, don't.Files that need to be edited should be downloaded to your hard drive, edited then reuploaded. If you are doing that, then like Mike asked... what program are you using to edit? I did not edit any file. I just go to Admin->Catalog->Catagories/Products->Products Description and paste the codes.
Epic Mike Posted March 29, 2006 Posted March 29, 2006 Ah, I see. OSC is uncommenting the " automatically. I thought there was an option in admin to turn that off but I don't see it now. I post links in my product descriptions to full reviews, etc. like this: <p><a href="../catalog/whatever.php">Read the full review here!!</a><p> without any problems so maybe someone else can chime in. If it's something that you want on every product description page then you can put it in product_info.php. Sorry I'm not much help.
Guest Posted March 29, 2006 Posted March 29, 2006 What you want to do is add; <a href="javascript:openwindow('/upload/2.php', 305, 550, 0, 0)">Upload</a> to your product description via the admin. (sorry this is a text link as that is what I have on my site, I am sure you can add the image). And in product_info.php add above </head>; <script language="javascript" type="text/javascript"> <!-- var open_window = false; var new_window = null; function openwindow(url,width,height,resizable,scrollbars,posx,posy) { if(posx==null) posx = 20; if(posy==null) posy = 20; now = new Date(); new_window=window.open(url, now.getHours()+now.getMinutes()+now.getSeconds(), 'width='+width+',height='+height+',resizable='+resizable+',scrollbars='+scrollbars+',screenY='+posy+',screenX='+posx+',top='+posy+',left='+posx); try { new_window.focus(); } catch(e) {} } //--> </script> With this you can use as many popups on your product info pages as you need. Just change the info you enter in the admin and it will work. HTH Peter
Recommended Posts
Archived
This topic is now archived and is closed to further replies.