function GenKeyForm(FormNum){
document.GenNewKey+FormNum.submit();
}
I have multiple forms within a php page. each form has been given an id and each respective submit link the same id within this javascript call GenKeyForm(ID).
How do i add FormNum to the object call document.GenNewKey.submit? I know in php you can append variables and strings using . however I have no idea for javascript.
the php for the form name is:
echo '<form action="#" name="GenNewKey'.$num.'" id="GenNewKey'.$num.'" method="POST">
Using dot notation requires you to use identifiers for each property name. If you want to use strings you have to use square bracket notation.