coleguitajuan 0 Newbie Poster

Hello,

I'm trying to create a form inside another form that it submits it depending on the option you choose on the select field using the js event "onselected="this.form.submit" but Im not familiar how to use it, the initial code is like that:

<form name="form1" method="post" submit="form1.php">
<form name="form2" method="post" submit="form2.php">
Name: <input type="text" name="fname"><br>
Email: <input type="text" name="fname"><br>
Account: <select name="account"><option value="icts">icts</option><option value="metatrader" onselected="this.form.submit();">metatrader</option></select><br>
<input type="submit" name="submit1" value="submit">
</form>
</form>

Any ideas?

Thanks in advance!
Cole