Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Java script error

Posted on 2011-09-10
3
Medium Priority
?
319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

618 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