Thread: Javascript
View Single Post
12-19-2005, 01:49 AM
#2
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

You might like to try using the following if statement:

Code:
if(document.RealEstate["INSPECTION_TIME_D"+x] && (document.RealEstate["INSPECTION_TIME_D"+x].value != "----")) {
That checks if document.RealEstate.INSPECTION_TIME_Dx exists and if its value property doesn't equal "----". The first check isn't 100% necessary but trying to get the value will throw up JS errors if the item doesn't exist.