| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Cursor starting in Search form? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() When an X-Cart page is loaded, I want the cursor to automatically appear in the Search box. In search.tpl (skin1/customer/), I tried adding
tabindex="0" or tabindex="1" to the text input form code, but it doesn't help. The first "tab" I hit highlights the URL in the address bar (this is in IE7), the 2nd the Refresh button, 3rd browser Google search field, 4th-7th other browser buttons, finally the 8th tab shows a cursor in the Search field. Many other web sites I use open a new page with the cursor in either their Login field or their Search field. Anybody solved this problem? Thanks, Dan
__________________
X-Cart version 4.0.17 X-Cart version 4.0.18 Web servers = Apache OS = Linux |
|||||||
#2
|
|||||||
|
|||||||
![]() In skin1/customer/home.tpl
Add this to your <body> tag Code:
![]()
__________________
xcartmods.co.uk |
|||||||
#3
|
|||||||
|
|||||||
![]() That works! Really excellent - thanks.
--Daniel
__________________
X-Cart version 4.0.17 X-Cart version 4.0.18 Web servers = Apache OS = Linux |
|||||||
#4
|
|||||||
|
|||||||
![]() This solution works in IE7, but not so much in Firefox 1.5.0.8.
With the search.tpl input form code using tabindex="1", a new page in FF requires one hit of the "Tab" key, to get the cursor to the Search box. Set to tabindex="0", it requires 8 hits. In IE7, either tabindex setting works - new pages load with the cursor already there.
__________________
X-Cart version 4.0.17 X-Cart version 4.0.18 Web servers = Apache OS = Linux |
|||||||
#5
|
|||||||
|
|||||||
![]() I found something that works in both FF and IE, and no "error on page" msgs. It sets an ID for both the search form and the text box. For example:
In search.tpl: Code:
Code:
__________________
X-Cart version 4.0.17 X-Cart version 4.0.18 Web servers = Apache OS = Linux |
|||||||
|
|||
X-Cart forums © 2001-2020
|