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

Buttons as Images in XC - why?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-29-2005, 10:40 AM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default Buttons as Images in XC - why?

Does anyone know the background as to why the default XC themes use images and Jscript actions to submit forms, rather than good ole plain <form> buttons?

Admitedly, i've only looked at one button so far...which is the submit button for the search field in the header. For example, in /customer/search.tpl, i've replaced this:

Code:
<TD valign="middle"> <INPUT class="inputfield" type="text" name="posted_data[substring]" size="16" value="{$search_prefilled.substring|escape}"> </TD> <TD valign="middle"> {include file="buttons/search_head.tpl"} </TD>

With this..

Code:
<TD valign="middle"> <INPUT type="text" name="posted_data[substring]" size="16" value="{$search_prefilled.substring|escape}"> </TD> <TD width="20"><input type="submit" name="Submit" value="{$lng.lbl_search}" class="button"></TD>

If this works site-wide, guess I could just have a single tpl include for a 'Go' button.Is there something glaringly obvious i'm overlooking here (as to why it's better to use images), or is it just a matter of taste?

Cheers,
JB
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
Reply With Quote
  #2  
Old 04-29-2005, 11:32 AM
 
balinor balinor is offline
 

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

Default

Personal preference. The buttons are currently designed as three cell tables, which allow the button to auto-stretch based on the text entered for the button. I suspect it was done this way to make it easy for non-html inclined people to edit the buttons.

Personally, I usually replace all the buttons with custom graphics by either creating a new template for each button, or by hard coding the buttons into the templates themselves.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 05-02-2005, 09:45 PM
 
zilker zilker is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 89
 

Default

I think they used this method for the visual aspect. There is so much more you can do with images that use JS actions. I know that an eye catching design isn't everything and simplicity is sometimes better but when you're selling in a highly competitive industry, you'd be surprised at how much your design influences your sales.

Like you said, I think a lot of it's personal preference. I guess you already know my preference.
__________________
~zilker

uummm...perhaps you should tell me again.

http://www.designertrends.com
Version 4.0.6
Unix
Reply With Quote
  #4  
Old 05-03-2005, 05:08 AM
  ETInteractive.com's Avatar 
ETInteractive.com ETInteractive.com is offline
 

X-Adept
  
Join Date: Dec 2002
Posts: 747
 

Default

using JS also stops ppl from using the back button and getting the pop up message about "post form" and do you want to resubmit the data.

If you use the form button. the browser will track the form action as a page in the history. When you use JS, it does not. If you hit Back it goes directly to the form entry screen and you get no pop up.
__________________
ETInteractive.com
X-Cart 3.5.x
Reply With Quote
  #5  
Old 05-06-2005, 11:31 AM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default

Thanks for the advice on this... Will have a play, I think...

Cheers,
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:36 AM.

   

 
X-Cart forums © 2001-2020