?
Solved

Java script error

Posted on 2011-09-10
3
Medium Priority
?
317 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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month8 days, 5 hours left to enroll

765 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