Welcome to Geeklog, Anonymous Monday, March 16 2026 @ 04:00 am EDT
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.
35
30
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
28
30
Quote
All times are EDT. The time is now 04:00 am.
- 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