Best Download Sites Login
Site Login

Straight Distance

Description
Enter a coordinate pair for each the starting and ending points according to the Cartesian coodinate system. The script will calculate the straight line distance between the two points....View A Script Demo


Do you find it confusing setting up these script?
Java Scripts Magic can do all the hard work for you all At The Touch Of A Button.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="TextPad 4.4">
<LINK href="general.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Jay Kimmel (jaykimmel@bigplanet.com) -->
<!-- Web Site:  http://www.jkimmel.com -->

<!-- Begin
function distance(form) {
var x1 = eval(form.x1.value);
var y1 = eval(form.y1.value);
var x2 = eval(form.x2.value);
var y2 = eval(form.y2.value);
var xdiff = x2 - x1;
var ydiff = y2 - y1;
form.answer.value = Math.pow((xdiff * xdiff + ydiff * ydiff), 0.5);
}
//  End -->
</script>

</HEAD>

<BODY Background=../graphics/grayback.jpg>
<center><BR><BR><BR>
<form>
<table border=3 cellspacing=2 cellpadding=5>
<tr>
<td colspan=4 align=center>Distance Calculator: From point A to point B</td>
</tr>
<tr>
<td colspan=2 align=center>Point A</td>
<td colspan=2 align=center>Point B</td>
</tr>
<tr>
<td align=center>(x<sub>A</sub>,</td>
<td align=center>y<sub>A</sub>)</td>
<td align=center>(x<sub>B</sub>,</td>
<td align=center>y<sub>B</sub>)</td>
</tr>
<tr>
<td align=center><input type=text name=x1 size=5></td>
<td align=center><input type=text name=y1 size=5></td>
<td align=center><input type=text name=x2 size=5></td>
<td align=center><input type=text name=y2 size=5></td>
</tr>
<tr>
<td colspan=4 align=center><input type=button value="Solve Distance" onClick="distance(this.form)"></td>
</tr>
<tr>
<td colspan=4 align=center><input type=text name=answer size=20></td>
</tr>
</table>
</form>

</center>
</BODY>
</HTML>
 

Business Proposal If you have a Business Proposal that you think may be of interest to us here at Best Download Sites please contact us to discuss the matter in further detail