SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2000
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have the following function:
    function getCCtype(radiogroup) {
    var cctype = '';
    var x = radiogroup.length;
    for (var i = 0; x > i; i ++) {
    if (radiogroup[i].)checked {
    // "Expected Identifier" error here
    return radiogroup[i].value;
    }
    }
    return '';
    }

    It is called like this:
    cctype = getCCType(obj.elements.paymenttype);

    But I keep getting the error shown
    above on the line noted.
    Anybody have any clues?


  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That is because you have a line like this:
    if (radiogroup[i].)checked {

    and it should read:
    if (radiogroup[i].checked) {


    Your closing parentheses is in the wrong place.

    ------------------
    Wayne Luke
    Internet Media Provider

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2000
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, I found that one and I still get the error.


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
  •