Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to gracefully degrade box gallery on product_info.php when javascript isn't available


freespace

Recommended Posts

Hello,

 

can anybody tell me the best way to degrade box gallery on the product_info.php page when javascript is unavailable?

 

right now if javascript is turned off, all the large images will be displayed on the page disrupting the layout of the page, i'm thinking about having just the main image displayed on the page if javascript is unavailable but i'm not really sure how to code that. (i'm on version 2.3.1)

Link to comment
Share on other sites

  • 3 weeks later...

i figured out a way to degrade the box gallery, these are the steps that i used:

 

1) assign the box gallery div element with another id such as nojava_piGal

 

2) style nojava_piGal in a way that all the images are re-sized correctly and displayed neatly within the page

 

3) directly underneath the line: <div id="nojava_piGal" style="float: right;">,

place this code <script type="text/javascript">document.getElementById('nojava_piGal').id='piGal';</script>

 

4) test your page - if javascript is enabled, the generic gallery style will change to the box gallery style, if not, the images will still displayed neatly in your page

 

 

you're welcome B)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...