Solved

Java script error

Posted on 2011-09-10
3
300 Views
Last Modified: 2012-05-12
I am getting an error on the firrst else  part of this coide any ideas.
var ret22 = this.getField("15").value
var ret1 =  this.getField("Buyer_1_Company").value;
var ret2 = this.getField("Buyer_1").value;
var ret3 = this.getField("Buyer_2").value;
var ret223 =  this.getField("Seller_1_Company").value;
var ret2321 = this.getField("Seller_1").value;
var ret232 = this.getField("Seller_2").value;
var ret33234 = this.getField("Buyer_Status_1").value;
var ret232345 = this.getField("Seller_Status_1").value;
var Buyer_address = this.getField("Buyer_N_1").value;
var seller_address = this.getField("Seller_N_1").value;
if(ret1.length > 0);
{
     STR = ret1
}
else
{
STR = ret2;
}
else if(ret223.length > 0);
{
     STR2 = ret223;
}else{
STR2 = ret2321  " and "  + ret232;
}
var ret =  "This Warranty Deed made this " + ret22 + " between " + STR2 + ", " + ret232345 + " whose post office address is " + seller_address + " grantor, and " + STR2 + " whose post office address is " + Buyer_address +", grantee:";
event.value = ret;
0
Comment
Question by:eteran
  • 3
3 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 36517956
>> if(ret1.length > 0);
>> else if(ret223.length > 0);
On both of the lines above you need to get rid of the semicolon
0
 
LVL 82

Expert Comment

by:hielo
ID: 36517963
>>else if(ret223.length > 0);
also, an "else" cannot be followed by an "else if". So that line should be:
...
if(ret223.length > 0)
{
...
}
...
0
 
LVL 82

Expert Comment

by:hielo
ID: 36517969
...
if(ret1.length > 0)
{
     STR = ret1
}
else
{
    STR = ret2;
}

if(ret223.length > 0)
{
     STR2 = ret223;
}
else
{
     STR2 = ret2321   + " and "  + ret232;
}
...
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now