on 06-17-2010 9:22 AM
Event I used - *Formready
default path given by ALD -
data.BodyPage.SF1.ITEMS.DATA :: ready:form - (Javascript, Client) -
And i had written following code
var data1;
data1 = "Total"
if ( xfa.form.data.BodyPage.SF1.ITEMS.DATA[*].XBLNR.rawValue == data1 )
{
xfa.form.data.BodyPage.SF1.ITEMS.DATA.XBLNR.border.fill = "True" ;
}
else{
xfa.form.data.BodyPage.SF1.ITEMS.DATA.XBLNR.border.fill = "False";
}
What i am doing :
variable data1 is having a value Total. Then i am comparing the value of field (xblnr) which is in ITEMS table . if value found,then i m filling the border.
But i am not getting any error in javascript and no changes on output . Can anybody suggest me in this?
Answer will really be appriciated.
Hi,
Try writting the code in the initialise event of the field XBLNR of the table.
You can write:
if ( this.rawValue == "Total" ){
this.parent.XBLNR.border.edge.color.value = "0,0,255";
}
Thanks,
Omkar Mirvankar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Refer Omkar solution. That solved my problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Omkar,Otto,Liz for Suggestions.
Omkar, solution given by you worked fine.
Border is coming for the entire field i.e Left, Right,Top and Bottom but my requirement is to get the border only at Top and Bottom.
So if you or other experts can suggest me the solution. Please advice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure if that can be done through scripting - to control each line separately. If you would not find a "proper/ right" solution, you can always create two fields, one without the border, second with the border you like and instead of manipulating the border, manipulate the fields visibility. Much easier, at least for me, regards Otto
Hi,
I might be incorrect, but please check the foll-
In javascript, all the variables and values you use are case sensitive. Pls. check this. Make sure all statements end with " ; "
You may be able to activate the form successfully despite incorrect coding in the script.
How I check for errors is by display both the values I am comparing, using a popup as follows -
xfa.host.messageBox("Total: " + Total);
Thanks, Liz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is your form dynamic? (a guess)
Did you check the value is already present when doing your comparison?
Regards Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.