Solved

Java script error

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
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.

867 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

21 Experts available now in Live!

Get 1:1 Help Now