Click to See Complete Forum and Search --> : PLEASE PLEASE HELP PLEASE i beg you


teg969
10-16-2003, 09:41 PM
hello people im a newbie and i do not get at all how this assigment is suposed to be done...i cant figure out how to calculate what the question stipulates....the shipping + book depending on price ETC please help me thanx


http://www.we-todd-did-racing.com/wetoddimage.wtdr/i=wMTgyMDI3NnM0MTNkZmQzMXk1NDE%3D
http://www.we-todd-did-racing.com/wetoddimage.wtdr/i=wMTgyMDI4NnM0MTNkZmQzMXk1NDE%3D

PLEASE help THanK you very much

teg969
10-16-2003, 09:43 PM
i dont kwo why the images arent showing up
but her is a link to were they are
http://forums.montrealracing.com/showthread.php?s=&threadid=74109

Charles
10-16-2003, 09:45 PM
Well, let's start with your form. What do you have?

teg969
10-16-2003, 09:48 PM
Originally posted by Charles
Well, let's start with your form. What do you have?

i dont kwo if this wil link proper but here is a try

http://www.we-todd-did-racing.com/wetoddimage.wtdr/i=wMTgyMDQzNnM0MTNkZmQzMXk1NDE%3D

teg969
10-16-2003, 09:50 PM
i dont kow how to make this work but up till now i have this i can put the HTM if you guys dotn mind


<html>
<head>
<title>HTML document</title>






<script language="javascript">
<!-- Hide from older browsers
function display_message1() {
alert("Thank you for ordering with us!");
}




// End hiding -->
</script>


</head>


<body>







<input type="checkbox" name="Dumies">Accounting for Dumies - 39.95 <br>

<input type="checkbox" name="Intro">Intro to Accounting - 48.36 <br>

<input type="checkbox" name="Advanced">Advance Placement Accounting - 27.95 <br>






<INPUT TYPE="button" value="Submit" onClick="display_message1()" >






</body>
</html>

teg969
10-16-2003, 09:51 PM
for now i only need to know how to create a that formula to be able to add 1 or 2 or 3 checked items plus the shipping following the rule

Charles
10-16-2003, 10:28 PM
We need to start with valid HTML A valid doctype and character set declaration are required. And in HTML 4.01 there is no "language" attribute for the SCRIPT element. And while you can do this without a FORM element it's a good bit easier with one.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>

<style type="text/css">
<!--
label {display:block; margin:1em 0em}
input {display:block}
-->
</style>

<script type="text/javascript">
<!--
function total (form) {
alert (form.elements[0].type)
}
// -->
</script>

<form action="">
<div>
<label><input type="checkbox">Accounting for Dummies - 39.95</label>
<label><input type="checkbox">Intro to Accounting - 48.36</label>
<label><input type="checkbox">Advance Placement Accounting - 27.95</label>
<button onclick="total(this.form)">Total</button>
</div>
</form>

Some hints...

1) You can either give each check box a name and then look up the price in your JavaScript or you can just assign the price to the checkbox's value attribute.

2) You will note that I've passed to the function the form object. This will greatly shorten your typing. From inside that called function you can get at the 1st element with "form.elements[0]".

3) From inside that function "form.elements[0].type" will equal "checkbox" if the first element is a checkbox.

4) From inside that function "form.elements[0].checked" will return true if the first element is checked.

5) From inside that function "form.elements[0].value" will return the value of the first element. However, it will return it as a string. Adding strings will cancatenate. To get at the number use Number(form.elements[0].value).

teg969
10-16-2003, 10:31 PM
thank you very much ....this is realy good but honnestly i didnt really undesrsstand everything of what you said....i really i am a newb in this...if never toucherd HTML or javascript before
but thanks if you can post further stuff it would be apreciated too
thanks