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(poFo rm,poElement)
{
if (document.forms[poForm].poElement.valu e == "Type Search Here...")
document.forms[poForm].poElement.valu e = "";
}
where the passing page calls the function as:
clearfield('for mname','formele ment');
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(poFo rm,poElement)
{
if (document.forms[poForm].poElement.valu e == "Type Search Here...")
document.forms[poForm].poElement.valu e = "";
}
where the passing page calls the function as:
clearfield('for mname','formele ment');
but just get errors.
Any help on this one would be most appreciative!!
Cheers
Bj McGowan
Comment