Howto check if an HTML-input exists? 
Author Message
 Howto check if an HTML-input exists?

Hello,

some client-side VBScript code needs to check if there is an HTML input type=text
in the page (which is generated by ASP, and therefore, it may be there or not).
When I do a referral like x=document.forms("form1").elements("inputname").value
an error occurs. How can I check if it exists in another way? Or is there a way
to handle this errors?

Thanks,
Oystein



Sat, 25 Oct 2003 19:57:42 GMT  
 Howto check if an HTML-input exists?
If TypeName(document.forms("form1").elements("inputname")) _
    = "HTMLInputElement" Then
  ' It exists
End If

If TypeName(document.forms("form1").elements("inputname")) _
    = "Nothing" Then
  ' It doesn't exist
End If

=-=-=
Steve
-=-=-


Hello,

some client-side vbscript code needs to check if there is an HTML input
type=text
in the page (which is generated by ASP, and therefore, it may be there or
not).
When I do a referral like
x=document.forms("form1").elements("inputname").value
an error occurs. How can I check if it exists in another way? Or is there a
way
to handle this errors?

Thanks,
Oystein



Sat, 25 Oct 2003 20:22:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Howto scroll an existing layer?

2. HowTo: Find out if File Exists

3. HOWTO: Redirected input

4. howto: existing visual basic exe as a web application

5. howto determine if a file exists

6. HOWTO: Implement an Existing Interface with VB6

7. HOWTO: Disable user mouse input but still allow software to play mouse events

8. HOWTO: Simulate user input

9. HOWTO: Simulate user input

10. HOWTO: Simulate user input

11. Check for page existence - HOWTO?

12. input will not receive focus or does not exist

 

 
Powered by phpBB® Forum Software