Jan 07, 2013, 10:31 PM
[CLOSED] Ext:Hidden value types 101
I am little weak/confused on javascript and if/how ext:Hidden can hold various types of values?
App.hRequestCompleted.value is true,
App.hRequestCompleted.rawValue is "true"
So in Javascript I can say:
I tried to perform the following in javascript:
App.hRequestCompleted.value is "true",
App.hRequestCompleted.rawValue is "true"
But performing the following in javascript gives me what I want (except rawValue is not set):
App.hRequestCompleted.value is true,
App.hRequestCompleted.rawValue is ""
What is the proper way to assign the field so I can use the value for boolean testing? It is getting late and I must not have had enough sugar and caffeine.
<ext:Hidden ID="hRequestCompleted" runat="server" />
If I assign it from the server side //Code behind
hRequestCompleted.SetValue(true);
Inspecting the control shows:App.hRequestCompleted.value is true,
App.hRequestCompleted.rawValue is "true"
So in Javascript I can say:
if (App.hRequestCompleted.value) do something;
So what is the proper way in javascript to assign hRequestCompleted so it represents a boolean?I tried to perform the following in javascript:
App.hRequestCompleted.setValue(false);
Inspecting the control shows:App.hRequestCompleted.value is "true",
App.hRequestCompleted.rawValue is "true"
But performing the following in javascript gives me what I want (except rawValue is not set):
App.hRequestCompleted.value = false;
Inspecting the control shows:App.hRequestCompleted.value is true,
App.hRequestCompleted.rawValue is ""
What is the proper way to assign the field so I can use the value for boolean testing? It is getting late and I must not have had enough sugar and caffeine.
Last edited by Daniil; Jan 08, 2013 at 3:22 PM.
Reason: [CLOSED]