Click here to Skip to main content
11,570,352 members (53,755 online)

JavaScript

 
AnswerRe: Accessing another windows variables Pin
all_in_flames23-Apr-12 4:12
memberall_in_flames23-Apr-12 4:12 
Questionpassing parameter from one page to another Pin
jack4277928-Feb-12 11:12
memberjack4277928-Feb-12 11:12 
AnswerRe: passing parameter from one page to another Pin
mark merrens28-Feb-12 11:33
membermark merrens28-Feb-12 11:33 
QuestionJQuery Animate Pin
SRJ9226-Feb-12 16:22
memberSRJ9226-Feb-12 16:22 
Questionpassing parameter from one page to another Pin
vaibhavtiwari26025-Feb-12 21:00
membervaibhavtiwari26025-Feb-12 21:00 
AnswerRe: passing parameter from one page to another Pin
hansoctantan28-Feb-12 2:04
memberhansoctantan28-Feb-12 2:04 
AnswerRe: passing parameter from one page to another Pin
chandubond12-Mar-12 6:17
memberchandubond12-Mar-12 6:17 
QuestionTrying to use age.ClientScript.RegisterHiddenField - need help Pin
Member 779716724-Feb-12 13:49
memberMember 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
eg_Anubhava21-Feb-12 6:59
membereg_Anubhava21-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
eg_Anubhava21-Feb-12 17:19
membereg_Anubhava21-Feb-12 17:19 
GeneralRe: How to Create Ruler JavaScript Pin
johny1015198122-Feb-12 14:34
memberjohny1015198122-Feb-12 14:34 
AnswerRe: How to Create Ruler JavaScript Pin
stuartthomas0125-Mar-12 21:13
groupstuartthomas0125-Mar-12 21:13 
Questioncall web service from java script Pin
giocot17-Feb-12 6:35
membergiocot17-Feb-12 6:35 
AnswerRe: call web service from java script Pin
Joachim123421-Feb-12 10:59
memberJoachim123421-Feb-12 10:59 
Questioni am using console.log() in my code. Pin
DeepthiTanguturi15-Feb-12 18:27
memberDeepthiTanguturi15-Feb-12 18:27 
AnswerRe: i am using console.log() in my code. Pin
thatraja15-Feb-12 19:29
mvpthatraja15-Feb-12 19:29 
AnswerRe: i am using console.log() in my code. Pin
DaveAuld19-Feb-12 0:59
mentorDaveAuld19-Feb-12 0:59 
Questionattr disabled property is not working for FF Pin
dayakar_dn12-Feb-12 19:35
memberdayakar_dn12-Feb-12 19:35 
AnswerRe: attr disabled property is not working for FF Pin
Graham Breach12-Feb-12 22:46
memberGraham Breach12-Feb-12 22:46 
AnswerRe: attr disabled property is not working for FF Pin
johny1015198114-Feb-12 5:53
memberjohny1015198114-Feb-12 5:53 
GeneralRe: attr disabled property is not working for FF Pin
ramuAlla1-Mar-12 1:15
memberramuAlla1-Mar-12 1:15 
AnswerRe: attr disabled property is not working for FF Pin
Edward Nutting19-Feb-12 0:34
memberEdward Nutting19-Feb-12 0:34 
QuestionHow can i use backbone.js Pin
DeepthiTanguturi10-Feb-12 22:02
memberDeepthiTanguturi10-Feb-12 22:02 
AnswerRe: How can i use backbone.js Pin
Richard MacCutchan10-Feb-12 23:50
mvpRichard MacCutchan10-Feb-12 23:50 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150624.2 | Last Updated 1 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid