Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if field exists on page

Status
Not open for further replies.

rkoya

IS-IT--Management
Joined
Jul 12, 2004
Messages
57
Location
GB
Hi,

I need to check if a specific field is on the page or not. It is put in dynamically, and is not always there. Is there a way to check it?

The input name is:

<input name="fldLocalExtrainAmount" type="text" id="fldLocalExtrainAmount" value="0" size="4" maxlength="1" onBlur="fnCalcLocalExtraTotalin (this.value);">

Thanks
 
if it is in a form you could use the document.<formname>.<fieldname> approach in an IF statement, alternatively you could use document.getElementByID instead.


Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005
 
Thanks use of document.formname.fieldname worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top