Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product_info Folder Tabs - Javascript guru required


Guest

Recommended Posts

if you look here:

http://www.almatcomputers.co.uk/product_in.../products_id/19

 

you will see the tabs displayed ok under IE but under Mozilla it goes weird. I either need someone to debug my codes or a piece of <IF coing, if IE do this IF Mozilla do that.

 

Here is the coding:

 

2 files first:

 

Product_tabs.css (here)

Product_tabs.js (here)

 

The calling code

<div class="prod_tabs"><ul id="mainnav1">
<li><a href="#DESC"><acronym title="<?PHP echo TEXT_TAB_DESC; ?>">
<?PHP echo TEXT_TAB_DESC; ?></acronym></a></li>
<?php if ($product_info['products_tabspec'] > '') { ?>
<li><a href="#TAB1"><acronym title="<?PHP echo TEXT_TAB_SPEC; ?>">
<?PHP echo TEXT_TAB_SPEC; ?></acronym></a></li>
<?php } if ($product_info['products_tabimage'] > '') { ?>
<li><a href="#TAB2"><acronym title="<?PHP echo TEXT_TAB_IMAGE; ?>">
<?PHP echo TEXT_TAB_IMAGE; ?></acronym></a></li>
<?php } if ($product_info['products_tabsupport'] > '') { ?>
<li><a href="#TAB3"><acronym title="<?PHP echo TEXT_TAB_SUPPORT; ?>">
<?PHP echo TEXT_TAB_SUPPORT; ?></acronym></a></li><?php } 
if (!MAX_REVIEWS_IN_PRODUCT_INFO == '0') {
if ($reviews['count'] > 0) { ?>
<li><a href="#TAB4"><acronym title="<?PHP echo TEXT_TAB_REVIEW . ' (' . $reviews['count']; ?>)"><?PHP echo TEXT_TAB_REVIEW . ' (' . $reviews['count']; ?>)</acronym></a></li><?php } 
}
?></ul></div>

 

And the displaying code,

 

<div id="DESC" class="tabcontent"><u><div style="font-size: 12px;font-weight: bold;">
<?php echo TEXT_TAB_DESC_SUB; ?></div></u><br><?php echo stripslashes($product_info['products_description']); ?>
<?php if (tep_not_null($product_info['products_url'])) { echo '<br><br>' . sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); } ?></div>

<?php if ($product_info['products_tabspec'] > '') { ?>
<div id="TAB1" class="tabcontent"><u><div style="font-size: 12px;font-weight: bold;">
<?PHP echo TEXT_TAB_SPEC_SUB; ?></div></u><br><?php echo stripslashes($product_info['products_tabspec']); ?></div><?php } ?>

<?php if ($product_info['products_tabimage'] > '') { ?>
<div id="TAB2" class="tabcontent"><u><div style="font-size: 12px;font-weight: bold;">
<?PHP echo TEXT_TAB_IMAGE_SUB; ?></div></u><br><?php echo stripslashes($product_info['products_tabimage']); ?></div><?php } ?>

<?php if ($product_info['products_tabsupport'] > '') { ?>
<div id="TAB3" class="tabcontent"><u><div style="font-size: 12px;font-weight: bold;">
<?PHP echo TEXT_TAB_SUPPORT_SUB; ?></div></u><br><?php echo stripslashes($product_info['products_tabsupport']); ?></div><?php } ?>

<?php if (MAX_REVIEWS_IN_PRODUCT_INFO > 0) { 
 if ($reviews['count'] > 0) { 
?>

<div id="TAB4" class="tabcontent"><div style="font-size: 12px;font-weight: bold;"><u>
<?PHP echo $product_info['products_name'] ?> Product Reviews</u> <?php echo tep_image(DIR_WS_IMAGES . 'layout/stars_' . $reviews_rating . '.gif', 'Average Rating from ' . $reviews['count'] . ' customers.', '', '', 'align=absmiddle'); ?></div><br>

 

 

Can anyone help and maje this browser compatible

Link to comment
Share on other sites

Does anyone know the coding for browser detection.

 

For example

 

<If> Internet Explorer then load "mysite/ie.css"

 

<else> load "another.css"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...