Online Shopping : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

13 of 17 people (76%) answered Yes
Recently 8 of 10 people (80%) answered Yes


How do I check if a form exist in a frame ?

Apr 6th, 2008 18:50
ha mo, Luiz Paulo Rosa, Francesco Defazio, chris ker,

You can do it using try catch. For example you can do in this way:
	var a =;
	alert("The form " + a + " is present!");
	var b=;
	alert("The form "+ b + " is present!");
	alert("someone form not exist!");
If in your page exist a form called frmTest and a form called frmTest2 
the execution not enter in a catch statement. Otherwise if isn't 
present one of them an exception are throw.
Excuse me for my english!
Francesco Defazio
Try the 'eval' command:
The command above returns true if the form myForm exists in the frame