Click here to Skip to main content
15,887,175 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Accessing another windows variables Pin
all_in_flames23-Apr-12 4:12
professionalall_in_flames23-Apr-12 4:12 
Questionpassing parameter from one page to another Pin
jack4277928-Feb-12 11:12
jack4277928-Feb-12 11:12 
AnswerRe: passing parameter from one page to another Pin
R. Giskard Reventlov28-Feb-12 11:33
R. Giskard Reventlov28-Feb-12 11:33 
QuestionJQuery Animate Pin
SRJ9226-Feb-12 16:22
SRJ9226-Feb-12 16:22 
Questionpassing parameter from one page to another Pin
vaibhavtiwari26025-Feb-12 21:00
vaibhavtiwari26025-Feb-12 21:00 
AnswerRe: passing parameter from one page to another Pin
hansoctantan28-Feb-12 2:04
professionalhansoctantan28-Feb-12 2:04 
AnswerRe: passing parameter from one page to another Pin
chandubond12-Mar-12 6:17
chandubond12-Mar-12 6:17 
QuestionTrying to use age.ClientScript.RegisterHiddenField - need help Pin
Member 779716724-Feb-12 13:49
Member 779716724-Feb-12 13:49 
Hi,

I have a myPage.aspx page and 2 user controls, ucA and ucB. ucA (parent control) is being used in ucB (child control inherits ucA). Finallly ucB is registered in myPage.aspx. I have two dropdowns in ucB.

Now, I am trying to put the selected values of these dropwdowns in a hidden variables using the below code and I am putting this in myPage.aspx page_load code


Page.ClientScript.RegisterHiddenField("LabValue", labname selectedvalue using FindControl)

Page.ClientScript.RegisterHiddenField("ClientValue", ClientName SelectdValue using FindControl))

The above code runs fine and no errors.

Now in the exeternal .js file I am accessing this values as

var lv = document.getElementById("LabValue").value;
var cv = document.getElementById("ClientValue").value;

All look fine. But the issue is no matter what values I put in the LabValue and ClientValue hidden fields I always get the values as 0 for lv and cv (java script variables).

Say for instance if LabValue is 10002 when I try to access it via javasacript using document.getElementById("LabValue").value; I always get 0 instead of 10002. It is the same case with the other hidden field too.

When I looked at the myPage.aspx viewsource I always see

<input type="hidden" name="LabValue" id="LabValue" value="0" />


Am I missing some thing here?

Thanks in advance,

L

modified 24-Feb-12 20:04pm.

QuestionHow to Create Ruler JavaScript Pin
Anubhava Dimri21-Feb-12 6:59
Anubhava Dimri21-Feb-12 6:59 
AnswerRe: How to Create Ruler JavaScript Pin
AspDotNetDev21-Feb-12 7:07
protectorAspDotNetDev21-Feb-12 7:07 
GeneralRe: How to Create Ruler JavaScript Pin
Anubhava Dimri21-Feb-12 17:19
Anubhava Dimri21-Feb-12 17:19 
GeneralRe: How to Create Ruler JavaScript Pin
Mohibur Rashid22-Feb-12 14:34
professionalMohibur Rashid22-Feb-12 14:34 
AnswerRe: How to Create Ruler JavaScript Pin
stuartthomas0125-Mar-12 21:13
stuartthomas0125-Mar-12 21:13 
Questioncall web service from java script Pin
giocot17-Feb-12 6:35
giocot17-Feb-12 6:35 
AnswerRe: call web service from java script Pin
Joachim123421-Feb-12 10:59
Joachim123421-Feb-12 10:59 
Questioni am using console.log() in my code. Pin
DeepthiTanguturi15-Feb-12 18:27
DeepthiTanguturi15-Feb-12 18:27 
AnswerRe: i am using console.log() in my code. Pin
thatraja15-Feb-12 19:29
professionalthatraja15-Feb-12 19:29 
AnswerRe: i am using console.log() in my code. Pin
DaveAuld19-Feb-12 0:59
professionalDaveAuld19-Feb-12 0:59 
Questionattr disabled property is not working for FF Pin
dayakar_dn12-Feb-12 19:35
dayakar_dn12-Feb-12 19:35 
AnswerRe: attr disabled property is not working for FF Pin
Graham Breach12-Feb-12 22:46
Graham Breach12-Feb-12 22:46 
AnswerRe: attr disabled property is not working for FF Pin
Mohibur Rashid14-Feb-12 5:53
professionalMohibur Rashid14-Feb-12 5:53 
GeneralRe: attr disabled property is not working for FF Pin
ramuAlla1-Mar-12 1:15
ramuAlla1-Mar-12 1:15 
AnswerRe: attr disabled property is not working for FF Pin
Ed Nutting19-Feb-12 0:34
Ed Nutting19-Feb-12 0:34 
QuestionHow can i use backbone.js Pin
DeepthiTanguturi10-Feb-12 22:02
DeepthiTanguturi10-Feb-12 22:02 
AnswerRe: How can i use backbone.js Pin
Richard MacCutchan10-Feb-12 23:50
mveRichard MacCutchan10-Feb-12 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.