www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] for statement

  1. #1
    Join Date
    Jan 2009
    Posts
    9

    resolved [RESOLVED] for statement

    Hi friends,
    How are you? I hope that everything is OK...
    My question is such:

    How can i do it using for statement(iteration) for the following code:

    if (document.getElementById('classPropertyList[1].oracleType.id').value == -1) {
    alert(document.getElementById('classPropertyList[1].oracleType.id').value);
    return false;
    } else {
    alert(document.getElementById('classPropertyList[1].oracleType.id').value);
    return true;
    }
    }

    example for source code:
    name="classPropertyList[1].oracleType.id".........value="-1"
    ..............................................................................
    name="classPropertyList[17].oracleType.id".........value="16"
    ....................etc...............................................

    Gratitudes at first!

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    for(var i=1; i<someValue; i++) {
    if (document.getElementById('classPropertyList['+i+'].oracleType.id').value == -1) {

  3. #3
    Join Date
    Jan 2009
    Posts
    9

    Thanks

    Thanks a lot!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles