...

View Full Version : How do I Determine Whether I am In a Form or Not Using DOM?



dealmaker
12-30-2005, 05:40 PM
Hi,
I am writing a generic javascript function. It can be used at the Form onSubmit or anywhere that is not inside a form. I need a way to determine whether this function is running inside a form or not. How do I do that?

I can pass a form name as parameter into the function then check the arguements.length. But I want a cleaner way. Maybe I can use "this" object to do it?

Many thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum