PDA

View Full Version : if elseif condition error help needed



meenakshi
05-16-2008, 08:54 AM
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


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

rangana
05-16-2008, 09:07 AM
The same answer: ;)
http://codingforums.com/showpost.php?p=689407&postcount=2

jscheuer1
05-16-2008, 09:10 AM
If this is javascript (this is the javascript forum), its:


else if

not:


elseif

There could also be other problems.

meenakshi
05-16-2008, 09:13 AM
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