Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Help with buttons....

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-11-2008, 10:29 AM
 
pcarcare pcarcare is offline
 

eXpert
  
Join Date: Jun 2004
Location: Salt Lake City, Utah
Posts: 230
 

Default 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
__________________
X-cart gold 4.5.2 (live)
X-payments 1.0.5

http://www.professionalcarcare.com
Your online source for all your car care needs
Reply With Quote
  #2  
Old 06-12-2008, 12:26 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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
Reply With Quote
  #3  
Old 06-12-2008, 08:50 AM
 
pcarcare pcarcare is offline
 

eXpert
  
Join Date: Jun 2004
Location: Salt Lake City, Utah
Posts: 230
 

Default Re: Help with buttons....

That worked....Thanks.

Are those links abled to be indexed by spiders? Is that something that I should worry about?
__________________
X-cart gold 4.5.2 (live)
X-payments 1.0.5

http://www.professionalcarcare.com
Your online source for all your car care needs
Reply With Quote
  #4  
Old 06-12-2008, 10:12 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 06-13-2008, 12:41 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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>
...... 
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:00 AM.

   

 
X-Cart forums © 2001-2020