Link to home
Start Free TrialLog in
Avatar of Kartibok
Kartibok

asked on

Forms

I am trying to create a form for a friend. He is running a party site. My problem is that I have created 2 drop down menus.
One says;

Text - What table number would you like?      Table 1    (with a value of 1)
                                                                  Table 2    (with a value of 2 etc)

The other says;

Number of seats required? 1       (value of 1)
                                       2        (value of 2 etc)

I would like a third box that tells me the total price of the selection?

Each table is priced per seat...eg tables 1 -20 are £150 per seat. Could I get it to tell the price in the final box? Or would it require loads of programming?

If anyone can help it would be appreciated.....

K
;)

Avatar of Saqib Khan
Saqib Khan
Flag of United States of America image

Something Like This?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
<form>
<select name="s1">
<option value=150>Table 1
<option value=200> Table2
</Select>
<Select name= "s2" onChange="total.value=s1.options[s1.options.selectedIndex].value * s2.options[s2.options.selectedIndex].value">
<option value=1>Seat 1
<option value=2>Seat 2
</setect>
<input type="text" name="total">
</form>
</BODY>
</HTML>
ASKER CERTIFIED SOLUTION
Avatar of mrwebdev
mrwebdev

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kartibok
Kartibok

ASKER

Many thanks to both of you. Th eone that requires less programming was the one I had to go for. Once again ....

Many thanks

K