Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

scrollbar for image popups


ridesign

Recommended Posts

Is there a way to add a scrollbar on the popup images?

 

Here is my current code for it:

<script language="javascript"><!--
     document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=0') . '\\\')">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . BOX_IMAGE_TEXT . '</a>'; ?>');
//--></script>

 

Thanks

Link to comment
Share on other sites

  • 3 weeks later...

In the popupWindow function of product_info.php page change the window.open function args so the scrolls are enabled.

 

Parameter scrollbars=yes

Link to comment
Share on other sites

Thanks for your reply.

 

SO would i do the following:

<script language="javascript"><!--
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=0') . '\\\')">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"' scrollbars="yes") . '<br>' . BOX_IMAGE_TEXT . '</a>'; ?>');
//--></script>

 

Thanks

Link to comment
Share on other sites

No leave that code as it was you have to modify the popupWindow function

from this

 

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

 

to this

 

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re
sizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,l
eft=150')
}
//--></script>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...