Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with "Products Description"


tomliuwhite

Recommended Posts

Posted

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.

Posted

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.

Posted
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.

Posted

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.

Posted
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.

Posted

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.

Posted

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...