Welcome to Geeklog, Anonymous Thursday, November 06 2025 @ 09:17 pm EST
Geeklog Forums
JAVASCRIPT in Geeklog ?
Status: offline
dodonpachi
Forum User
Junior
Registered: 05/13/02
Posts: 23
Location:Barcelona
Where's the origin of the following code ?? It's in my page source (not the php code but the final html code ):
*!-- Needed JavaScript Code --*
*script type="text/javascript"**/script*
var cleared = 0;
function clearField(field)
{
if (cleared != 1) {
field.value = ""
cleared = 1
} else {
cleared = 0
}
}
*script*
And what clearField() is used for ?? I don't find the callings.
*!-- Needed JavaScript Code --*
*script type="text/javascript"**/script*
var cleared = 0;
function clearField(field)
{
if (cleared != 1) {
field.value = ""
cleared = 1
} else {
cleared = 0
}
}
*script*
And what clearField() is used for ?? I don't find the callings.
29
23
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
It's in the header.thtml of some themes and is (again, in some themes) used to clear the input box for the "simple" search (in the header part of a site).
However, several themes do not use this code and probably just kept it because the comment said it was needed ...
bye, Dirk
24
26
Quote
All times are EST. The time is now 09:17 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content