T
threepins
Howdy,
Just wondering how the following might be done:
I have a couple of different webpages that need to call a function to
clear the textbox onFocus of the textbox. I'm wanting to use one
function that I can call from a javascript include file (rather than
having multiple versions of the function all through the site).
So far i've tried the following:
function clearfield(poForm,poElement)
{
if (document.forms[poForm].poElement.value == "Type Search Here...")
document.forms[poForm].poElement.value = "";
}
where the passing page calls the function as:
clearfield('formname','formelement');
but just get errors.
Any help on this one would be most appreciative!!
Cheers
Bj McGowan
Just wondering how the following might be done:
I have a couple of different webpages that need to call a function to
clear the textbox onFocus of the textbox. I'm wanting to use one
function that I can call from a javascript include file (rather than
having multiple versions of the function all through the site).
So far i've tried the following:
function clearfield(poForm,poElement)
{
if (document.forms[poForm].poElement.value == "Type Search Here...")
document.forms[poForm].poElement.value = "";
}
where the passing page calls the function as:
clearfield('formname','formelement');
but just get errors.
Any help on this one would be most appreciative!!
Cheers
Bj McGowan