Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to put links in produckt descriptions?


Guest

Recommended Posts

I want to include links in my product descrptions, I have been able to do this with standard html links with no problem. But, what I want is a javascipt link that opens a small "popup" with a more detailed description of a particular feature. It doesnt seem to like me putting the javascript in there and generally borks when I do. Any suggestions?

 

I hope I am describing this right. If not please ask and I will give whatever details are needed.

Link to comment
Share on other sites

I think you'll need to place your javascript in product_info.php as a "general" function. Then call that function with a href html link in the product description passing a variable like prod1.html that can be used in your general javascript routine to open a pop-up window and load that url.

 

Hope this helps

Link to comment
Share on other sites

Ok, I was guessing that it would be something along those lines. Since I am not real good at PHP can anyone help me on how to place the javascript in product_info.php since I am assuming it isnt as simple as cutting and pasting, but I am off to try that.

Link to comment
Share on other sites

Ok, it appears there is already a js function in there for this:

<script language="javascript"><!--

function popupWindow(url) {

 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizab
le=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=1
50')

}

//--></script>

So I added another below it:

<script language="javascript"><!--

function popupWindow2(url) {

 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resiza
ble=yes,copyhistory=no,width=600,height=400,screenX=150,screenY=150,top=150,left=
150')

}

//--></script>

Works like a champ. Thanks for the pointer.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...