• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Wie kann ich so ein Script realisieren?

Status
Für weitere Antworten geschlossen.

philipp1988

Neues Mitglied
hi all
folgendes problem..

im nachfolgenden Code habe ich einen shop ( ist ein projekt für die schule )und zur auswahl gibt es 3 briefmarken.

ich möchte sobald jmd die anzahl der einen Briefmarke auswählt der Preis für eine briefmarke * der Anzahl die er ausgewählt hat und dann in Sum1 speichern also ausgeben.

das bei jeder briefmarke

und dann alle 3 Summen ( sum1,sum2,sum3) unten in Total ausgeben.

Habe zurzeit ein blackout und komme irgendwie nicht drauf :D

danke und bye

Code:
<form action="data.html" name="order">
<table border="0"  width="200" height="100" align="left">

<tr>
	<td> <img src="Camerun.jpg" height="150" width="220"><br><br><br> <textarea name="text1" cols="25" rows="6">This Camerun Stamp is very interesting for a lot of people around the world. The fine construction of this stamp is very amazing.</textarea>
	<br><br>
          <font color="white"><b>Quantity:&nbsp;&nbsp;</b></font>

	<select name="number" size="1" onChange="">
                <option value="0" selected>0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
               </select><br><br>
          <font color="white"><b>Price: &nbsp;&nbsp;</b></font>
         <input type="Text" name="price1" value="32,50 Euro" size="" maxlength="">
         <br>  <font color="white"><b>Sum: &nbsp;&nbsp;&nbsp;</b></font>
         <input type="Text" name="sum" value="0,00 Euro" size="" maxlength="">
          </td>

</tr>
</table>
<table border="0" align="right" width="200" height="100">
<tr>
	<td> <img src="France.jpg" height="150" width="220"><br><br><br> <textarea name="text1" cols="25" rows="6">
Our newest stamp is this from France. The France are very nice und lovely people and this stamp shows a ship which made by good workers.</textarea>
	<br><br>
           <font color="white"><b>Quantity:&nbsp;&nbsp;</b></font>
	<select name="number1" size="1" onchange="stamp1()">
                <option value="0" selected>0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
               </select><br><br>
         <font color="white"><b> Price: &nbsp;&nbsp;</b></font>
         <input type="Text" name="price1" value="28,00 Euro" size="" maxlength="">
         <br>  <font color="white"><b>Sum: &nbsp;&nbsp;&nbsp;</b></font>
         <input type="Text" name="sum1" value="0,00 Euro" size="" maxlength="">
          </td>
</tr>
</table>
<table border="0" align="center" width="200" height="100" align="right">
<tr>
	<td> <img src="Austria.jpg" height="150" width="220"><br><br><br> <textarea name="text1" cols="25" rows="6">This is our EXPENSIVE stamp. It's a very old stamp from Austria. The frame is filled by unique gold which comes from Austria. </textarea>
	<br><br>
           <font color="white"><b>Quantity:&nbsp;&nbsp;</b></font>
	<select name="number" size="1" onChange="">
                <option value="0" selected>0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
               </select><br><br>
         <font color="white"><b> Price: &nbsp;&nbsp;</b></font>
         <input type="Text" name="price1" value="45,50 Euro" size="" maxlength="">
         <br>  <font color="white"><b>Sum: &nbsp;&nbsp;&nbsp;</b></font>
         <input type="Text" name="sum" value="0,00 Euro" size="" maxlength="">
          </td>
</tr>
</table>
<br><br><br>
<center>
<font color="white" size="4"><b>Total Sum:&nbsp;&nbsp;  </b></font>
<input type="Text" name"Total" value="0,00 Euro" size="" maxlength="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>

<input type="Submit" name="" value="Submit">
<input type="reset" value="Reset">
<br><br><br>

</form>
 
Werbung:
Status
Für weitere Antworten geschlossen.
Zurück
Oben