Hello
Pls. help me that,
var myObject = /TextField11/
var greyFieldsList = "TextFieldAA TextFieldBB TextFieldCC "
var ReqFieldsList = "TextField11 TextField22 TextField33 "
var returnValue = greyFieldsList.search(myObject);
var returnValueReq = ReqFieldsList.search(myObject);
if (returnValue != -1) {
this.fillColor = "192,192,192"; //GREY
this.access = "readOnly";
}
else if (returnValueReq != -1)
{
this.fillColor = "255,255,191"; //YELLOW
}
else
{
// do nothing
}
Yellow is not working at all!!
Grey is working some times, some times not!
Pls. correct my IF condition in such a way it shoud work.
At given point of time, any field possess only one color
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Please debug your code by putting alerts in between the lines coz for me code is working fine.
app.alert(returnValue);
app.alert(returnValueReq);
Hope this helps.
Views
Replies
Total Likes
Sorry please ignore this post. I was thinking in FormCalc mode rather than javascript!
I don't know if this will solve your problem but you haven't put an endif to close your if statement. Also you don't need the else 'do nothing' part of the statement, if your variables do not meet the criteria then it won't enter either of the statements because you have an else if so you can get rid of the last part.
Message was edited by: whyisthisme
Hi,
Please debug your code by putting alerts in between the lines coz for me code is working fine.
app.alert(returnValue);
app.alert(returnValueReq);
Hope this helps.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies