I have a password field that is on some pages and not on some pages. This is legacy code and it uses one include page for logic on both types of pages. I need to check if that control exists. I can’t seem to find a way to check using vbscript.
some pages have
<label>Enter Password:</label> <input type="password" name="pwd" id="pwd"/><br/>
some do not
Using ASP how do I check if it exists?
if (?????) then
end if
Not real sure if you are running on the server or on the client. So I’ll take a stab its on the client. This might work for you.Update:
Since this is server side, and vbscript is pretty long in the tooth, I dimly remember this working for me: