Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    popup form menu $ calculation

    Does anyone know how to use the javascript popup menus for selecting a item and having the total price displayed/ I have seen radio button examples but I too stupid to figure out how to get the popup menus to work?

    any help would be greatlt appreciated!

  • #2
    Regular Coder Vincent Puglia's Avatar
    Join Date
    Jul 2003
    Location
    where the World once stood
    Posts
    367
    Thanks
    0
    Thanked 13 Times in 13 Posts
    Hi,

    What do you mean by a popup menu? A selection list?
    see: http://members.aol.com/grassblad/cascade3.html

    Vinny
    Where the world once stood
    the blades of grass
    cut me still

  • #3
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    yeah just like that.. good work

    cheers

    Jason

  • #4
    Regular Coder Vincent Puglia's Avatar
    Join Date
    Jul 2003
    Location
    where the World once stood
    Posts
    367
    Thanks
    0
    Thanked 13 Times in 13 Posts
    Hi Jason,

    Glad you like it

    Hopefully within a week or two, it will be on the main site:

    http://members.aol.com/grassblad

    with explanations & other features

    Vinny
    Where the world once stood
    the blades of grass
    cut me still

  • #5
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    i need it without the array

    i need it without the array

    i tried and broke it

    thanks dude

  • #6
    Regular Coder Vincent Puglia's Avatar
    Join Date
    Jul 2003
    Location
    where the World once stood
    Posts
    367
    Thanks
    0
    Thanked 13 Times in 13 Posts
    how are you going to fill it? server-side?

    put up some code -- so I can see what you're doing

    (this is why I never get to finish this stuff
    Vinny
    Where the world once stood
    the blades of grass
    cut me still

  • #7
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    i am making an order form for tickets

    Regular Adult Price -- $8.50
    Children 6-11, and Senior´s 65+ -- $6.00
    Children 6 and under -- FREE

    Group Discounts - 10 or more - $5.00

    Shipping Charges are $1.50 per order

    i want them to be able to order ticks from each and get a total


    whats do you think is the best way?

    people might want to order multiple tickets

  • #8
    Regular Coder Vincent Puglia's Avatar
    Join Date
    Jul 2003
    Location
    where the World once stood
    Posts
    367
    Thanks
    0
    Thanked 13 Times in 13 Posts
    put the data in an array -- and either wait for the 'qty' selection list -- or write your own or hire someone to write it.

    Vinny
    Where the world once stood
    the blades of grass
    cut me still

  • #9
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    can you do it? how much?

    Vinny,

    can you do this? if so how much?

    thanks

    Jason

  • #10
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I got it figured out

    how and i add the $1.50 shipping charge

    thanks

    nice script man really!

  • #11
    New Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    please help mee!

    hello everyone, im new to javascripts and kinda strugggling with it

    can anybody please tell me wht is wrong with the following code,
    i have to creata an airline ticket price calculator form, i cant get it to work, im tried so many times.

    anybody's help will be really appreciated, i hope you guys wouldnt mind me posting the code in here.
    kush@n


    <html>
    <head>
    <title> Metropolis </title>


    <script language="javascript">
    <!-- // Calculate the cost of the flight
    function Calculatecost()

    {
    var routeIndex;//index of the selected route
    var fare;//cost of flights
    var seatingMultiplier;//seating class multiplier

    //determine the one-way fare for the selected route

    routeIndex=document.flightForm.route.selectedIndex;
    if (routeIndex==0)
    {
    alert("Select a route");
    return;
    }

    else

    {
    fare=document.flightForm.route.options[routeIndex].value;
    }

    // Adjust the fare if a return flight
    has been selected
    if(document.flightForm.returnFare.checkbox)
    {
    fare=fare*2;
    }

    //adjust the fare for the selected seating class

    seatingMultiplier=0;
    for(var i=0; i<=2; i++)
    {
    if(document.flightForm.seating[i].checked);
    seatingMultiplier=document.flightForm.seating[i].value;
    }

    if(seatingMultiplier==0)
    {
    alert("Please select a seating class");
    return;
    }
    else
    {
    fare=fare*seatingMultiplier;
    alert("The cost of the flight is $ +fare);
    }
    //-->
    </script>


    </head>
    <body>
    <h1> Metropolis Airline Fare Calculator
    </h1>

    <p> Complete the form below to Calculate the cost of your flight:</p>

    <form name="flightForm">
    <p>Route:

    <select name="route" size="1">
    <option> </option>
    <option value="210">Metropolis-Amity</option>
    <option value="220">Metropolis-Bedrock</option>
    <option value="180">Metropolis-Gotham</option>
    <option value="150">Metropolis-Smallville</option>
    <option value="250">Metropolis-Southpark</option>
    <option value="200">Metropolis-Springfield</option>

    </select>
    </p>
    <p>Click here if you wil be purchasing a return fare:
    <input type="checkbox" name="returnFare">
    </p>

    <p> Seating:<br>
    <input type="radio" name="seating" value="2">First Class</br>
    <input type="radio" name="seating" value="1.5">Business Class</br>
    <input type="radio" name="seating" value="1">Economy Class</br>
    </p>

    <p><input type="button" value="Calculate" onClick="Calculatecost()">
    <input type="reset" value="Reset"></p>

    </form>
    </body>
    </html>
    Kush@n

  • #12
    New Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    :(

    hope someone would help me with the above mentioned problem
    Kush@n


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •