User Profile

Collapse

Profile Sidebar

Collapse
CathInfo
CathInfo
Last Activity: Mar 18 '08, 01:40 PM
Joined: Feb 27 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • CathInfo
    started a topic What am I overlooking? Totally stumped!

    What am I overlooking? Totally stumped!

    Code:
    var s = document.getElementById('field[12]');
    var cust_cc_exp_month = s.options[s.selectedIndex].value;
    
    // This displays the correct Value -- which is "0" for item #0 = "Please select..."
    alert("Month: " + cust_cc_exp_month.toString());
    
    if (cust_cc_exp_month == "0") {
    // This code never executes!
    }
    
    Here is the HTML portion:
    		<select
    ...
    See more | Go to post

  • CathInfo
    started a topic Accessing arrays via DOM

    Accessing arrays via DOM

    I want to use an array for my fieldnames (field[1], field[2], etc.) instead of names like "first_name ", "last_name" , etc.

    It works from an HTML standpoint, but I can't seem to access the contents of those text input fields from Javascript. The code below works 100% if I change "field[3]" to any normal variable name like "last_name" .

    [CODE=javascript] if (cust_last_name .length...
    See more | Go to post
    Last edited by acoder; Feb 28 '08, 08:20 AM. Reason: Added code tags
No activity results to display
Show More
Working...