SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    341
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error with some simply JS :/

    Hi,

    Can someone please help me with this function:


    Code:
    function do_checks(thisform) {
    
       if (thisform.des_type.value == "1") {
    		do_checks_country(thisform);
       } elseif (thisform.des_type.value == "0") {
    		do_checks_continent(thisform);
       }
    }
    I get the following error with it~;

    Error: missing ; before statement
    Source File: http://domain.com/page.html
    Line: 590, Column: 41
    Source Code:
    } elseif (thisform.des_type.value == "0") {

    What am I missing? Gotta be something simple - but I can't work it out for the life of me

    TIA

    Andy

  2. #2
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    341
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind - got it (needed "else if", not "elseif"). Too used to perl syntax =)

    Cheers

    Andy


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
  •