Professional Web Applications Themes

I try all but no debug: common reson I think: js buttondoes not calc - Macromedia Dynamic HTML

js Q: there's a calculator on booking form at http://www.holidayaptsaspasia.com/bookingapt.html I do not see to work , can you help ? Also do NOT work the onsubmit="return submitForm();" (same page) ? check source... the onreset work . also no problem with php form processor . design Q: Also menu on top I want it (and I setup it right alignment) why exist some distance ?...

Sponsored Links
  1. #1

    Default I try all but no debug: common reson I think: js buttondoes not calc

    js Q:
    there's a calculator on booking form at
    http://www.holidayaptsaspasia.com/bookingapt.html
    I do not see to work , can you help ?
    Also do NOT work the onsubmit="return submitForm();" (same page) ? check
    source...
    the onreset work . also no problem with php form processor .
    design Q:
    Also menu on top I want it (and I setup it right alignment) why exist some
    distance ?



    Sponsored Links
    123polis123 Guest

  2. #2

    Default Re: I try all but no debug: common reson I think: jsbutton does not calc

    code below is for calculator at(body):
    Code:
    <input type="button" name="button6" id="button6" value="Calculate Total"
    onclick="calc();"/>
    is it correct ?
    head:
    Code:
    <title>Booking Form</title>
    <script type="text/javascript">
    function calc() {
    if (doent.book.ac2.checked == "true") {   // does not work either with  ==
    true
    var ac = 6;
    } else {
    ac = 0;
    }
    // ac = 6; if (pInt(doent.book.month.value) > 3 &&
    pInt(doent.book.month.value) < 11) {
    
    if ((doent.book.month.value) > 3 && (doent.book.month.value) < 11) {
    var rate = 41;   // rate for two Summer
    } else {
    rate = 35;
    }
    if (pInt(doent.book.adults.value % 3) == 0) {
    var not3 = 0;
    } else {
    not3 = 1;
    }
    var tsp1 = new
    Date(doent.book.year.value,doent.book.month.value-1,doent.book.day.valu
    e);
    var tsd1 = new
    Date(doent.book.toyear.value,doent.book.tomonth.value-1,doent.tobook.da
    y.value);
    var tsp = tsp1.getTime();
    var tsd = tsd1.getTime();
    // tsp = tsp1.valueOf();
    // tsd = tsd1.valueOf();
    var days1;
    days1 = ($tsd - $tsp)/(24*60*60);
    // doent.book.euro.value = 99;
    doent.book.days.value = days1; //days1
    var eurocost = days1 * (Math.floor(pFloat(doent.book.adults.value) /
    3) * (6 + rate + ac) + not3 * (rate + ac));
    // doent.book.euro.value = days1 *
    (Math.floor(pFloat(doent.book.adults.value) / 3) * (6 + rate + ac) +
    not3 * (rate + ac));
    doent.book.euro.value = eurocost;
    alert(days1);
    alert(eurocost);
    //x = floor((doent.book.adults.value)/3)
    //doent.book.euro.value = doent.book.days.value * (x * (47+ac) + 41 +
    ac) ;
    }
    </script>
    code below is for the onsubmit="return submitForm();" (same page) , does not
    work ?

    Code:
    function submitForm() {
    if (doent.book.email.value == "") {
    window.alert("You must enter your email address to submit form!");
    return false;
    }
    var startDate = new
    Date(doent.book.year.value,doent.book.month.value-1,doent.book.day.valu
    e);   //  var startDate = new
    Date(doent.forms[0].year.value,doent.forms[0].month.value,doent.forms[0
    ].day.value);
    var endDate = new
    Date(doent.book.toyear.value,doent.book.tomonth.value-1,doent.book.toda
    y.value);   //  var endDate = new
    Date(doent.forms[0].toyear.value,doent.forms[0].tomonth.value,doent.for
    ms[0].today.value);
    
    if (startDate.getTime() > endDate.getTime()) {   //  startDate.valueof() >
    endDate.valueof()
    window.alert("You must enter Start Date prior End Date to submit form!");
    return false;
    }
    else
    return true;
    }  // end function   p261 gosselin book
    </script>
    123polis123 Guest

  3. #3

    Default Re: I try all but no debug: common reson I think: jsbutton does not calc

    What is your browser? IE or Firefox ?
    yupieyi Guest

  4. #4

    Default Re: I try all but no debug: common reson I think: jsbutton does not calc

    problem fixed, I decided to to the calc with php to confirm page.
    123polis123 Guest

Similar Threads

  1. Calc help please
    By The in forum FileMaker
    Replies: 8
    Last Post: November 6th, 06:37 AM
  2. #24964 [Bgs]: Apache crashes!, for no reson
    By jorge at jorge dot be in forum PHP Development
    Replies: 0
    Last Post: August 6th, 01:48 PM
  3. #24964 [Opn->Bgs]: Apache crashes!, for no reson
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: August 6th, 01:11 PM
  4. #24964 [NEW]: Apache crashes!, for no reson
    By Jorge at jorge dot be in forum PHP Development
    Replies: 0
    Last Post: August 6th, 12:00 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139