the code below works if I take out the if this raw value section and turns on the check boxes and opens access but it won't else. I am just learning javascripting on the fly and am very unsure as to whether this is an else, if else, or whatever
on click I want it to show all "rows", and "Hide" chkboxes, then open "" access
when if this raw value statement is in I get the following message.
[0]:EditTables[0]:click
SyntaxError: missing } in compound statement
17:XFA:form1[0]:Main[0]:T2[0]:Edit[0]:EditTables[0]:click
SyntaxError: syntax error
4:XFA:form1[0]:Main[0]:T2[0]:Edit[0]:EditTables[0]:click
if (this.rawValue == "1")
{
//// take out the above and it only does the first part of the code.
var rowCount = 14; //change this number to number of rows in table
for(var i=1 ; i<rowCount ; i++)}
{
if (xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i +""))//.presence = " ")//wprks with or without
{
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i +"").presence = "visible";
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i + ".c1.Hide").presence = "visible";
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i + ".c2").access = "";
}
else //// won't do the following the way it is written
{
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i + ".c1.Hide").presence = "hidden";
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i + ".c2").access = "readOnly";
}
}
Views
Replies
Total Likes
The curly brace next to your for statement is backwards.
Kyle
Views
Replies
Total Likes
could you be a bit more specific, I can do some things, terminology is not good. I make up my own names for things, so I can remember how to do them. Is it in this section? if so where please.
doesn't every open curly thing have to have a close??
if (this.rawValue == "1")
{
//// take out the above and it only does the first part of the code.
var rowCount = 14; //change this number to number of rows in table
for(var i=1 ; i<rowCount ; i++)}
{
if (xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i +""))//.presence = " ")//wprks with or without
{
Views
Replies
Total Likes
if (this.rawValue == "1")
{
//// take out the above and it only does the first part of the code.
var rowCount = 14; //change this number to number of rows in table
for(var i=1 ; i<rowCount ; i++)}<------BACKWARDS. Needs to be {
{
if (xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i +""))//.presence = " ")//wprks with or without
{
Kyle
Views
Replies
Total Likes
Kyle forgive me I am struggling, the below is what is currently what is being used, learning little by little, trying to put the pieces together., scroll down further to view what I am working with. Any help you can offer, I would appreciate.
I tried your suggestion and got the following error
7:XFA:form1[0]:Main[0]:T2[0]:Edit[0]:EditTables[0]:click
SyntaxError: missing ) after condition
6:XFA:form1[0]:Main[0]:T2[0]:Edit[0]:EditTables[0]:click
SyntaxError: missing ) after condition
6:XFA:form1[0]:Main[0]:T2[0]:Edit[0]:EditTables[0]:click
this is what I want to do. and
if (this.rawValue == "1")
var rowCount = 14; //change this number to number of rows in table
for(var i=1 ; i<rowCount ; i++)
}
{
if (xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i +""){//.presence = " ")
{
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i +"").presence = "visible";
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i + ".c1.Hide").presence = "visible";
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i + ".c2").access = "";
}
else
{
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i + ".c1.Hide").presence = "hidden";
xfa.resolveNode("form1.Main.T2.T1.QA.Q.r" + i + ".c2").access = "readOnly";
}
}
this is what I have that's long and dragged out.
if (this.rawValue == "1")
{
form1.Main.T2.T1.QA.Q.r1.c1.ChkYes.presence = "visible";
form1.Main.T2.T1.QA.Q.r1.c1.ChkNo.presence = "visible";
form1.Main.T2.T1.QA.Q.r1.c1.HideYes.presence = "visible";
//form1.Main.T2.T1.HR.Edit.Locked.presence = "hidden";
//form1.Main.T2.T1.HR.Edit.Unlocked.presence = "visible";
form1.Main.T2.T1.QA.Q.T2QHeader.T2QHeading.access = "";
// Question Table - show all rows
form1.Main.T2.T1.QA.Q.r1.presence = "visible";
form1.Main.T2.T1.QA.Q.r2.presence = "visible";
form1.Main.T2.T1.QA.Q.r3.presence = "visible";
form1.Main.T2.T1.QA.Q.r4.presence = "visible";
form1.Main.T2.T1.QA.Q.r5.presence = "visible";
form1.Main.T2.T1.QA.Q.r6.presence = "visible";
form1.Main.T2.T1.QA.Q.r7.presence = "visible";
form1.Main.T2.T1.QA.Q.r8.presence = "visible";
form1.Main.T2.T1.QA.Q.r9.presence = "visible";
form1.Main.T2.T1.QA.Q.r10.presence = "visible";
form1.Main.T2.T1.QA.Q.r11.presence = "visible";
form1.Main.T2.T1.QA.Q.r12.presence = "visible";
form1.Main.T2.T1.QA.Q.r13.presence = "visible";
form1.Main.T2.T1.QA.Q.r14.presence = "visible";
//form1.Main.T2.T1.QA.Q.r15.presence = "visible";
// Question table - Show the Hide row button - All rows
form1.Main.T2.T1.QA.Q.r1.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r2.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r3.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r4.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r5.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r6.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r7.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r8.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r9.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r10.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r11.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r12.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r13.c1.Hide.presence = "visible";
form1.Main.T2.T1.QA.Q.r14.c1.Hide.presence = "visible";
//form1.Main.T2.T1.QA.Q.r15.c1.Hide.presence = "visible";
// Question table – Open c2 open access to edit - All rows
form1.Main.T2.T1.QA.Q.r1.c2.access = "";
form1.Main.T2.T1.QA.Q.r1.c2.access = "";
form1.Main.T2.T1.QA.Q.r2.c2.access = "";
form1.Main.T2.T1.QA.Q.r3.c2.access = "";
form1.Main.T2.T1.QA.Q.r4.c2.access = "";
form1.Main.T2.T1.QA.Q.r5.c2.access = "";
form1.Main.T2.T1.QA.Q.r6.c2.access = "";
form1.Main.T2.T1.QA.Q.r7.c2.access = "";
form1.Main.T2.T1.QA.Q.r8.c2.access = "";
form1.Main.T2.T1.QA.Q.r9.c2.access = "";
form1.Main.T2.T1.QA.Q.r10.c2.access = "";
form1.Main.T2.T1.QA.Q.r11.c2.access = "";
form1.Main.T2.T1.QA.Q.r12.c2.access = "";
form1.Main.T2.T1.QA.Q.r13.c2.access = "";
}
else
{
form1.Main.T2.T1.QA.Q.r1.c1.HideYes.presence = "hidden";
// Question table - Show the Hide row button - All rows
form1.Main.T2.T1.QA.Q.r1.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r2.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r3.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r4.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r5.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r6.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r7.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r8.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r9.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r10.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r11.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r12.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r13.c1.Hide.presence = "hidden";
form1.Main.T2.T1.QA.Q.r14.c1.Hide.presence = "hidden";
//form1.Main.T2.T1.QA.Q.r15.c1.Hide.presence = "hidden";
// Question table – Open c2 open access to edit - All rows
form1.Main.T2.T1.QA.Q.r1.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r1.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r2.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r3.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r4.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r5.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r6.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r7.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r8.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r9.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r10.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r11.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r12.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.r13.c2.access = "readOnly";
form1.Main.T2.T1.QA.Q.T2QHeader.T2QHeading.access = "readOnly";
form1.Main.T2.T1.QA.Q.r1.c1.HideYes.presence = "hidden";
}
As Always,
Lori Lee
Stop the Madness!! NO SPAM Please
Date: Fri, 28 Jun 2013 13:07:29 -0700
From: forums_noreply@adobe.com
To: llee440@hotmail.com
Re: help with else
created by dcidev in LiveCycle Designer - View the full discussion
if (this.rawValue == "1")
{
//// take out the above and it only does the first part of the code.
var rowCount = 14; //change this number to number of rows in table
for(var i=1 ; i<rowCount ; i++)}<
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies