Results 1 to 4 of 4

Thread: if elseif condition error help needed

  1. #1
    Join Date
    Nov 2007
    Posts
    69
    Thanks
    36
    Thanked 0 Times in 0 Posts

    Default if elseif condition error help needed

    hi
    i m unable to understand where the problem is when i use the if elseif condition
    pls help me recitify the problem

    variable name

    Code:
    var a1;
    var rdata1; //rdata can either be 0 or 1
    var ddata; // ddata can either be 0 or 1
    
    if (rdata1==1 && ddata1==1)
                	{
                	a1="Pieces Have Been Delivered already.";
                	}
    elseif (rdata1<1 && ddata1<1)
                	{
                	a1="Still Pending";
                	}
    elseif (rdata1<1 && ddata1==1)
                	{
                	a1="realter";
                	}
    elseif (rdata1==1 && ddata1<1)
                	{
                	a1="gone for alteration";
                	}

    but it shows me some error
    pls help
    thanks
    anand
    Last edited by jscheuer1; 05-16-2008 at 09:08 AM. Reason: add code tags

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If this is javascript (this is the javascript forum), its:

    Code:
    else if
    not:

    Code:
    elseif
    There could also be other problems.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    meenakshi (05-16-2008)

  5. #4
    Join Date
    Nov 2007
    Posts
    69
    Thanks
    36
    Thanked 0 Times in 0 Posts

    Default

    hi
    thanks
    so stupid of me
    i was making such a stupid error
    elseif sud have been else if
    thanks
    u guys are really helpful
    smile always
    bye

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
  •