Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trying to fix this code....


vashichino7

Recommended Posts

Posted

Hey guys, how do I fix this code so that my h ref works correctly? This is in my menu.php...

 

<li class="menu_item <?php if ($tab_sel == tep_href_link(ELECTRONICS)) echo "selected"?>" onclick="document.location='<?php echo '<a href=http://www.savingshub.com/electronics-c-51.html>';?><?php echo tep_draw_menu_top()?><a><?php echo Electronics;?></a><?php echo tep_draw_menu_bottom()?></li>

 

 

any clue how to fix the h ref?

 

Thank you for all your help....

 

Best,

V

Posted

try this

 

<li class="menu_item <?php if ($tab_sel == tep_href_link(FILENAME_ELECTRONICS, '' ,'SSL')) echo "selected"?>" onclick="document.location='<?php echo '<a href="' . tep_href_link(FILENAME_ELECTRONICS, '', 'SSL') .'"><?php echo tep_draw_menu_top() ?><?php echo TEXT_ELECTRONICS; ?></a><?php echo tep_draw_menu_bottom()?></li>

 

you must have the file name defined in includes/filenames.php and the TEXT ELECTRONICS in the corresponding english file

"The doorstep to the temple of wisdom is a knowledge of our own ignorance."

Posted

The target of document.location is just a URL, not a full HTML link. So it would be

 

<li class="menu_item <?php if ($tab_sel == tep_href_link(FILENAME_ELECTRONICS, '' ,'SSL')) echo "selected"?>" onclick="document.location='<?php echo tep_href_link(FILENAME_ELECTRONICS, '', 'SSL'); ?>'"> <?php echo tep_draw_menu_top() ?><?php echo TEXT_ELECTRONICS; ?><?php echo tep_draw_menu_bottom()?></li>

See my profile for a list of my addons and ways to get support.

Archived

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

×
×
  • Create New...