| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Inserting an initial value in to the search box | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I'm doing an artwork overhaul on a 4.1.6 site and I want to set a word as the initial value in the search box.
In straight HTML I would use value="blah blah", but the value is already set in the x-cart box as value="{$search_prefilled.substring|escape}" How can I go about getting the word 'Search' to appear as an initial value in the search box without disturbing what x-cart as in there already?
__________________
Version 4.1.6 to 4.1.11 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() try ...
Code:
__________________
Darren Kierman Carlisle Glass (http://www.carlisleglass.co.uk/) ... running X-Cart Gold 4.4.5 [unix] |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() An underused html attribute that works in modern browsers is placeholder.
Use it like this <input type="text" placeholder="blah, blah">. I used to do it with javascript, but this works great.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#4
|
|||||||
|
|||||||
![]() Thanks Darren. The javascript worked a charm.
__________________
Version 4.1.6 to 4.1.11 |
|||||||
|
|||
X-Cart forums © 2001-2020
|