SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,616
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    form thaat adds values?

    My page has a form (http://www.unlimitedwealth.biz/orde...ferrer=nnnnnnnn)
    I'm trying to make to total in the form depend on what is selected. The first thing (unlimited Wealth Manual) goes for $100 each, the 2nd thing (Marketing Kit) is $9.95. So far I've did all i can and need to know what I'm missing??
    Thanks

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Firefox's JavaScript Console
    Error: this.form.kit[this.form.kit] has no properties
    Source File: http://www.unlimitedwealth.biz/order...errer=nnnnnnnn
    Line: 103
    Use Firefox's JavaScript Console to check your script for errors.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,616
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I got firefox and am viewing the javascript console. I have no idea how to fix the error?
    Help?
    PLEASE!

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please fix your HTML and CSS errors.

    And try this. Change
    Code:
    var e, i = 0;
    while (e = document.forms[0][['manual', 'kit'][i++]]) {e.onchange = function () {
    var one = new Dollars (this.form.manual[this.form.manual.selectedIndex].value);
    var two = new Dollars (this.form.kit.value);
    to
    Code:
    var e, i = 0, one, two;
    while (e = document.forms[0][['manual', 'kit'][i++]]) {e.onchange = function () {
      one = new Dollars (this.form.manual.options[this.form.manual.selectedIndex].value);
      two = new Dollars (this.form.kit.options[this.form.kit.selectedIndex].value);
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


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
  •