Results 1 to 6 of 6
Related
-
What would you do in order to be famous? Forum: General Discussion
Replies: 6 -
jmail /asp sort order Forum: ASP Forum
Replies: 0 -
order by date Forum: PHP Forum
Replies: 10 -
php data order Forum: PHP Forum
Replies: 1 -
Does the order of properties in CSS matter? Forum: CSS Forum
Replies: 7
-
08-15-2003, 01:13 PM #1
I need help in setup a order form!
OK what i would like to do is in my form is to add ( percentages) to it calculates all the State charges. I can't gite it to work in it can anyone help with this?
Here all the form
<html>
<head>
<title>Sales</title>
<script language="JavaScript">
<!--
function CalcTot(form) {
var Tickets=(isNaN( parseInt(form.tickets.value) )) ? 0 : parseInt(form.tickets.value);
var Donation=(isNaN( parseFloat(form.donation.value) )) ? 0 : parseFloat(form.donation.value);
form.Amount.value = (Tickets*1.00)+Donation;
}
-->
</script>
</head>
<body bgcolor="#ffffff">
<center><table>
<tr>
<td>
<FORM METHOD=POST ACTION="" name="">
<table border="1" width="100%" bordercolor="#cccccc">
<tr>
<td align="center">Total:<br></td>
<td>
<INPUT type="text" size="10" name="tickets" onBlur="CalcTot(this.form)"></td>
</tr>
<tr>
<td align="center">Select a State</td>
<td>
<select name="donation" onchange="CalcTot(this.form,this)">
<option>--- Select A State ---<option value="10.00">Over Night<option value="5.00">Next Day</select>
</tr>
<tr>
<td align="center">Total Amount</td>
<td><INPUT type="text" size="10" name="Amount" readonly></td>
</tr>
</table>
</FORM>
</td>
</tr>
</table>
</center>
</body>
</html>Last edited by knightjt02; 08-30-2003 at 12:50 AM.
-
08-16-2003, 01:25 AM #2
throwing a page of code at me and telling me you want percentages for it doesn't tell me much. Give me more info on your script, what exactly you want done, how is it submitting how are you getting something back outa the code that you've written? What and where do you want the percentages, just give more details.
-
08-16-2003, 07:04 AM #3( percentages) to it calculates all the State charges
<select name="donation" onchange="CalcTot(this.form,this)">
<option>--- Select A State ---
ADD (PERCENTAGES) IN HERE<option value="10.00">----
ADD (PERCENTAGES) IN HERE<option value="5.00">----</select>Last edited by knightjt02; 08-16-2003 at 07:12 AM.
-
08-16-2003, 12:17 PM #4
Why don't you just automatically add the charges into the price instead of using more code to put it in? Unless I'm getting you wrong.
-
08-16-2003, 04:28 PM #5
Every state will have a different sales tax amount, so what is needed is each state needs a corresponding percentage so when Texas is selected, it inputs the proper sales tax for texas, same for Cali, ohio and tinbuctwo.
Dave
-
08-17-2003, 12:43 AM #6
Oh I was confused cause under the State list it only had two things, and I figured "State of order" rather than "United States"... hola if no one has it by the morning I'll give it a go my skills with more advanced javascript functions only go so far.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum