The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Pre-populated text in header search box
This has to be the most basic edit to a forum ever, but i've been looking all over and can't seem to find the answer!
On the "main" search box on a forum index page in the header, how to you have it pre-populate with some text (for example "Search xyx.com forums") and have it disappear when a user starts typing? Is there template that can be edited with some code to do this? |
#2
|
|||
|
|||
Not sure if it's the same template for 4.2.x but it's a simple edit.
http://www.vbulletin.com/forum/forum...66#post3573666 The edit works in FireFox, can't say if it works in other browsers since I don't have my test site up any longer. |
2 благодарности(ей) от: | ||
409industries, tbworld |
#3
|
|||
|
|||
Should work in all current browser today including IE10+. Nice post @John_Lester forgot all about the new (3 years old) placeholder element. I have always done this effect in JavaScript.
|
#4
|
|||
|
|||
Made the code edits (I had to poke around a bit as my theme had this in the "header" template). Turns out that the compatiblity seems to be as it was before. Works great in Firefox (29.0.1) and Chrome (35.0.1916.114 m), but Internet Explorer (10.0.9200.16899) does not display the placeholder text.
Not a deal breaker by any means. Thank you John_Lester ad tbworld for replying. This is exactly what I was looking for and i'm glad it didn't require a plugin to get it to work. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|