calculation form problem!
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 4 of 4

Thread: calculation form problem!

Threaded View

  1. #1
    Join Date
    May 2009

    Question calculation form problem!

    hi there guys, I'm still fairly new to web design, so please bear with me. I need a calculation form that calculates the value of a quote based on the information they provide. I would like my form to only display the quote once the "get quote" button is pressed, and in the text box. I would also like the answer displayed so that it isn't 'editable', because that could be problematic! I know it's only a simple issue, but any help would be great. Thanks in advance!

    <table width="100&#37;" border="0" cellspacing="0" cellpadding="6">
                      <th width="35%" align="center" scope="col">&nbsp;</th>
                      <th width="65%" align="left" scope="col">
                        <option selected="selected"></option></th>
                      <td align="center">&nbsp;</td>
                      <td align="left">&nbsp;</td>
                      <td align="center"><label for="typeofparty">Type Of Party</label></td>
                      <td align="left"><select name="typeofparty" id="typeofparty" onclick="KW_calcForm('total',100,2,'#typeofparty','+','#hoursofparty')">
                        <option selected="selected">choose...</option>
                        <option value="0">Birthday Party</option>
                        <option value="50">Wedding</option>
                        <option value="0">childrens Party</option>
                      <td align="center"><label for="hoursofparty">Hours Of Party</label></td>
                      <td align="left" onclick="KW_calcForm('total',100,2,'#hoursofparty')"><select name="hoursofparty" id="hoursofparty" onclick="KW_calcForm('total',100,2,'#typeofparty','+','#hoursofparty','+','#DJ')">
                        <option selected="selected">Choose...</option>
                        <option value="100">1</option>
                        <option value="150">2</option>
                        <option value="200">3</option>
                        <option value="225">4</option>
                        <option value="250">5</option>
                      <td align="center"><label for="chooseyourdj">Choose your DJ</label></td>
                      <td align="left"><select name="chooseyourdj" id="chooseyourdj" onclick="KW_calcForm('total',100,2,'#typeofparty','+','#hoursofparty','+','#chooseyourdj')">
                        <option selected="selected">choose...</option>
                        <option value="75">Mark</option>
                        <option value="25">Frances</option>
                        <option value="1">Loserface</option>
                      <td align="center"><label for="location">Location of Function</label></td>
                      <td align="left"><select name="location" id="location">
                        <option value="0">Essex</option>
                        <option value="0">Kent</option>
                        <option value="50">London</option>
                      <td align="center"><label for="total">Total</label></td>
                      <td align="left"><input name="total" type="text" id="total" onclick="KW_calcForm('VarTotal',100,2,'#typeofparty','+','#hoursofparty','+','#chooseyourdj','+','#location')" value="&#163;" /></td>
                      <td align="center"><label for="clear"></label></td>
                      <td align="left"><label for="submit"></label>
                        <label for="getquote"></label>
                      <input type="submit" name="getquote" id="getquote" value="Get Quote!" onclick="compute(this.form)"/>
    Last edited by PeejAvery; May 13th, 2009 at 06:44 AM. Reason: Added code tags.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This a survey!

HTML5 Development Center