Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Just a quick JS question


Mouzi's Avatar
Member
0 0

Let's say I have a JavaScript variable called someInput that refers to an input object, and that the input object is inside a form that has "page.php" as action attribute.

Now, is there a way to get the action attribute of the form that the input object is in? I could use someInput.parentNode.action, but it is not guaranteed that the parentNode is the form :S

EDIT: Found the answer with google (didn't find anything when I first tried). Apparently you can use someInput.form.action


ghost's Avatar
0 0

i like ur sig ftw!