PDA

View Full Version : User Entered Data for Several Calculations

Foxmach
Mar 14th, 2007, 06:57 PM
I'm fact finding at the moment, and hoping to get some advice.

I have an Excel table, where the user enters some data which prompts several different calculations to occur and return values.

I would now like to put this table on our website. The user would be entering 6 different numbers, and 6 different things would be calculated and returned.

Of course, I cannot put the Excel file on here as an attachment, which is why I'm fact finding right now.

I'm sorry if this description is too cryptic. I'm looking to find out if this is something I simply need to hire someone to do, or is it not as complicated as I think it is and someone here can do it quickly, or is it worth my time to learn JavaScript for this?

Most of the calculations themselves are pretty basic, involving simple multiplication and division, but one is all about cosines, sines, and is basically a convoluted formula.

vwphillips
Mar 14th, 2007, 08:01 PM
Welcome

just post the formula you wish to apply

Foxmach
Mar 14th, 2007, 08:14 PM
I actually have found the code, and now I just need to find out how to tweak it to work on my own page. Here goes, it's long:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0062)http://www.latitudesoftware.com/pacificpress/BendForceCalc.htm -->
<TITLE>Pacific Press Brake Tonnage Calculator</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<script type="text/javascript" language="JavaScript">
var win = null;
function newWindow(mypage,myname,w,h,features) {
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + h + ',';
settings += 'width=' + w + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += features;
win = window.open(mypage,myname,settings);
win.window.focus();
}
</script>

<SCRIPT src="functions/BendForceCalc.htm" type=text/javascript></SCRIPT>
<STYLE>
TD {
FONT-SIZE: 10pt;
FONT-FAMILY: "Times New Roman", Times, serif;
}
TABLE {
.ro_input {
BORDER-RIGHT: 0px inset;
BORDER-TOP: 0px inset;
BORDER-LEFT: 0px inset;
BORDER-BOTTOM: 0px inset;
BACKGROUND-COLOR: #FFFFFF;
TEXT-ALIGN: right;
color: #000000;
}
.robig_input {
BORDER-RIGHT: 0px inset;
BORDER-TOP: 0px inset;
FONT-WEIGHT: bold;
FONT-SIZE: 14pt;
BORDER-LEFT: 0px inset;
BORDER-BOTTOM: 0px inset;
FONT-FAMILY: Arial;
BACKGROUND-COLOR: #FFFFFF;
TEXT-ALIGN: right;
color: #000000;
}
TH {
FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: #FFFFFF; FONT-FAMILY: "Times New Roman", Times, serif; BACKGROUND-COLOR: #003366}
.style2 {font-size: 12pt}
.style3 {
font-family: "Times New Roman", Times, serif;
font-size: 10pt;
}
.style5 {color: #000000}
.style6 {font-size: 10pt; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
color: #993333;
}
a:visited {
color: #CCCCCC;
}
a:hover {
color: #003366;
}
</STYLE>
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<script language="JavaScript" type="text/JavaScript">
<!--

if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
<BODY>
<div id="Layer1" style="position:absolute; left:245px; top:305px; width:135px; height:88px; z-index:1; background-color: #DFF4FF; layer-background-color: #DFF4FF; border: 1px #000000; overflow: visible; visibility: hidden;">
<p class="style5"><span class="style6">What is K Factor? &nbsp;&nbsp;Give a meaning. &nbsp;&nbsp;This is just to show &nbsp;&nbsp;how the pop up &nbsp;&nbsp;works. </span></p>
</div>
<FORM name=Calc>
<TABLE width="400" border=0 cellPadding=5 cellSpacing=0 borderColor=#c0c0c0 id=table1>
<TBODY>
<TR>
<TH height="29" colSpan=2>
<P align=center><B>Pressbrake Tonnage Calculator</B></P></TH>
</TR>
<TR>
<TD colspan="2" valign="top"><p><b><a href="BendForceCalcB.htm">Click here for a description of the calculator. </a></b></p>
<p><b>Instructions: </b><span class="style25"><em><b><font color="#993333">Input data into the blue boxes </font></b></em></span><span class="style15"> for your material and punch &amp; die configuration. This estimates the tonnage required to complete a 90&deg; bend. <a href="#null" onClick="newWindow('Calc_Ref.htm','','480','400','resizable,scrollbars,status')">Click here for Material Strength Reference Table.</a></span>
</p></TD>
</TR>
<TR>
<TD width="57%" bgcolor="#EBEBEB"><div align="right">Tensile Strength (PSI)</div></TD>
<TD width="43%" align=right bgcolor="#DFF4FF" style="BORDER-RIGHT: 1px solid"><div align="left">
<INPUT
onkeydown=Clear(this.form) onchange=ReCalc(this.form) size=7
value=95000 name=D5>
</div></TD>
</TR>
<TR>
<TD width="57%"><div align="right">Material Thickness (inches) - T </div></TD>
<TD width="43%" align=right bgcolor="#DFF4FF" style="BORDER-RIGHT: 1px solid"><div align="left">
<INPUT
onkeydown=Clear(this.form) onchange=ReCalc(this.form) size=7
value=0.375 name=D7>
</div></TD></TR>
<TR>
<TD width="57%" bgcolor="#EBEBEB"><div align="right">Die Width (inches) - W</div></TD>
<TD width="43%" align=right bgcolor="#DFF4FF" style="BORDER-RIGHT: 1px solid"><div align="left">
<INPUT
onkeydown=Clear(this.form) onchange=ReCalc(this.form) size=7
value=3.5 name=D9>
</div></TD></TR>
<TR>
<TD width="43%" align=right bgcolor="#DFF4FF" style="BORDER-RIGHT: 1px solid"><div align="left">
<INPUT
onkeydown=Clear(this.form) onchange=ReCalc(this.form) size=7
value=0.25 name=D11>
</div></TD>
</TR>
<TR bgcolor="#FF6600">
<TD colspan="2"><div align="center">
<input onClick=ReCalc(this.form) type=button value=Calculate/Recalculate name=B3>
</div></TD>
</TR>
<TR>
<TD width="57%"><div align="right" onMouseOver="MM_showHideLayers('Layer1','','show')" onMouseOut="MM_showHideLayers('Layer1','','hide')">K Factor </div></TD>
<TD style="BORDER-RIGHT: 1px solid" align=right width="43%"><div align="left">
<INPUT
</div></TD>
</TR>
<TR>
<TD width="57%" bgcolor="#EBEBEB"><div align="right">Die Ratio (W/T)</div></TD>
<TD width="43%" align=right bgcolor="#EBEBEB" style="BORDER-RIGHT: 1px solid"><div align="left">
<INPUT
</div></TD>
</TR>
<TR>
<TD width="57%"><div align="right">Bend Radius - Inside<br>
<TD style="BORDER-RIGHT: 1px solid" align=right width="43%"><div align="left">
<INPUT
</div></TD>
</TR>
<TR>
<TD width="57%" bgcolor="#EBEBEB"><p align="right">Bend Radius - Outside<br>
</TD>
<TD width="43%" align=right bgcolor="#EBEBEB" style="BORDER-RIGHT: 1px solid"><div align="left">
<INPUT
</div></TD>
</TR>
<TR>
<TD width="57%"><p align="right">Minimum Between Bends<br>
Minimum Leg Length for Die Width</p>
</TD>
<TD style="BORDER-RIGHT: 1px solid" align=right width="43%"><div align="left">
</div></TD>
</TR>
<TR>
<TD width="57%" bgcolor="#EBEBEB"><div align="right"><B>Tonnage Required
</B>(per foot of Bend)</div></TD>
<TD width="43%" align=right bgcolor="#EBEBEB" style="BORDER-RIGHT: 1px solid"><div align="left">
<INPUT class=robig_input size=7 name=D18>
</div></TD>
</TR>
<TR bgcolor="#CCCCCC">
<TD colspan="2"><div align="left"><B>Total Tonnage for Bend
</B></div></TD>
</TR>
<TR>
<TD><div align="right">Overall Length </div></TD>
<TD bgcolor="#DFF4FF"><input onKeyDown=Clear(this.form) onChange=ReCalc(this.form) size=5 value=20 name=F20>
FT<font size=3>&nbsp;</font></TD>
</TR>
<TR>
<TD colspan="2" bgcolor="#EBEBEB">
<div align="center"><font size=3> </font><font size=3>
<input class=robig_input size=7 name=G20>

vwphillips
Mar 14th, 2007, 08:34 PM
just post the formula you wish to apply
and
functions/BendForceCalc.htm

Foxmach
Mar 14th, 2007, 08:41 PM
I'm sorry, I'm not sure what you are asking me to do. As I stated in my original post, I know next to nothing about JavaScript. I had to post the code of that whole page because I don't even know what is useful and what is not. It is fine if I need to get professional help with this; that's part of what I'm trying to find out.

When I look back at the code, I think I'm realizing that the page where I took it from is hiding the actual formula or something. I'll look more into this. Sorry if I've wasted any of your time.