X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Help with buttons.... (https://forum.x-cart.com/showthread.php?t=40429)

pcarcare 06-11-2008 10:29 AM

Help with buttons....
 
How do I make this button work without making the text the hyperlink..


<table cellspacing="0" cellpadding="0" onclick=href="/register.php" class="ButtonTable">
<tr><td><input type="image" src="{$ImagesDir}/but_menu1.gif" class="ButtonSide_menu" alt="" /></td><td class="Button_menu"><font class="Button_menu">
Register</font></td><td><img src="{$ImagesDir}/but_menu2.gif" class="ButtonSide_menu" alt="" /></td></tr>
</table>

Whats the proper code for the "onclick" tag.

Thanks

Yurij 06-12-2008 12:26 AM

Re: Help with buttons....
 
Quote:

Originally Posted by pcarcare
How do I make this button work without making the text the hyperlink..


<table cellspacing="0" cellpadding="0" onclick=href="/register.php" class="ButtonTable">
<tr><td><input type="image" src="{$ImagesDir}/but_menu1.gif" class="ButtonSide_menu" alt="" /></td><td class="Button_menu"><font class="Button_menu">
Register</font></td><td><img src="{$ImagesDir}/but_menu2.gif" class="ButtonSide_menu" alt="" /></td></tr>
</table>

Whats the proper code for the "onclick" tag.

Thanks


Try use this code:
PHP Code:

<table cellspacing="0" cellpadding="0" onclick="javascript: self.location='register.php';" class="ButtonTable">
<
tr><td><input type="image" src="{$ImagesDir}/but_menu1.gif" class="ButtonSide_menu" alt="" /></td><td class="Button_menu"><font class="Button_menu">
Register</font></td><td><img src="{$ImagesDir}/but_menu2.gif" class="ButtonSide_menu" alt="" /></td></tr>
</
table


pcarcare 06-12-2008 08:50 AM

Re: Help with buttons....
 
That worked....Thanks.

Are those links abled to be indexed by spiders? Is that something that I should worry about?

balinor 06-12-2008 10:12 AM

Re: Help with buttons....
 
Spiders can't handle javascript onclick links, as they don't 'click', which is fine as you don't want them to spider the cart or checkout area anyway.

Yurij 06-13-2008 12:41 AM

Re: Help with buttons....
 
Quote:

Originally Posted by balinor
Spiders can't handle javascript onclick links, as they don't 'click', which is fine as you don't want them to spider the cart or checkout area anyway.



Options (for spiders):1. You can use the site map.

2. You can add a link in the table.

PHP Code:

.........
<
a href="cart.php">
<
font class="Button_menu">
Register</font>
</
a>
...... 



All times are GMT -8. The time now is 01:45 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.