Solved

Java script error

Posted on 2011-09-10
3
315 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 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

Technology Partners: 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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

737 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