I'm developing a scientific calculator and I've addded a feature that solves linear equations too. Here you can see the link to the page. When you click on Sistemi you see a new page with some input fields and the button "Solve".
<form name="sis1grado" action="sistema1.js">
<p align="center"><input id="x1" type="text" name="usrname" style="width:42px"> x + <input id="x2" type="text" name="usrname" style="width:42px"> y = <input id="x3" type="text" name="usrname" style="width:42px"></p>
<p align="center"><input id="x4" type="text" name="usrname" style="width:42px"> x + <input id="x5" type="text" name="usrname" style="width:42px"> y = <input id="x6" type="text" name="usrname" style="width:42px"></p>
<br>
<table width="216px" border="0" align="center">
<td width="16px">
<img src="http://i1087.photobucket.com/albums/j475/BetoMan0/graffapar.png" />
</td>
<td width="90px">
x = <input id="totx" type="text" name="usrname" style="width:42px">
<br>
<br>
y = <input id="toty" type="text" name="usrname" style="width:42px">
</td>
<td width="110px">
<p align="center"><INPUT TYPE="submit" Value="Solve"></p>
</td>
</table>
</form>
This is the code of the "Sistemi" page. In the same folder as calcolatricecs.html I have a js file called sistema1.js. It contains a function, called s1(), that has the code I must use for solve the equation (click here to see that the js file).
When I click the button Solve I'd like solve the equation calling the s1() function. To do this, I put <form name="sis1grado" action="sistema1.js"> and I also gave to my input the attribute submit as you can see.
This way is not working to me because when I click the button, anything happen. What could I do?