Click here to Skip to main content

JavaScript

 
AnswerRe: .exe in java PinmvpRichard MacCutchan4-Mar-12 0:27 
Questionnodejs article moderation state unclear PinmemberHarish Palaniappan3-Mar-12 18:43 
AnswerRe: nodejs article moderation state unclear PinmvpRichard MacCutchan4-Mar-12 0:26 
AnswerRe: nodejs article moderation state unclear PinmemberBobJanova5-Mar-12 1:43 
QuestionAccessing another windows variables PinmemberMember 43038102-Mar-12 4:16 
AnswerRe: Accessing another windows variables PinmemberBobJanova2-Mar-12 5:14 
AnswerRe: Accessing another windows variables Pinmemberall_in_flames23-Apr-12 5:12 
Questionpassing parameter from one page to another Pinmemberjack4277928-Feb-12 12:12 
AnswerRe: passing parameter from one page to another Pinmembermark merrens28-Feb-12 12:33 
QuestionJQuery Animate PinmemberSRJ9226-Feb-12 17:22 
Questionpassing parameter from one page to another Pinmembervaibhavtiwari26025-Feb-12 22:00 
AnswerRe: passing parameter from one page to another Pinmemberhansoctantan28-Feb-12 3:04 
AnswerRe: passing parameter from one page to another Pinmemberchandubond12-Mar-12 7:17 
QuestionTrying to use age.ClientScript.RegisterHiddenField - need help [modified] PinmemberMember 779716724-Feb-12 14: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 Pinmembereg_Anubhava21-Feb-12 7:59 
AnswerRe: How to Create Ruler JavaScript PinprotectorAspDotNetDev21-Feb-12 8:07 
GeneralRe: How to Create Ruler JavaScript Pinmembereg_Anubhava21-Feb-12 18:19 
GeneralRe: How to Create Ruler JavaScript Pinmemberjohny1015198122-Feb-12 15:34 
AnswerRe: How to Create Ruler JavaScript Pingroupstuartthomas0125-Mar-12 22:13 
Questioncall web service from java script Pinmembergiocot17-Feb-12 7:35 
AnswerRe: call web service from java script [modified] PinmemberJoachim123421-Feb-12 11:59 
Questioni am using console.log() in my code. [modified] PinmemberDeepthiTanguturi15-Feb-12 19:27 
AnswerRe: i am using console.log() in my code. Pinmvpthatraja15-Feb-12 20:29 
AnswerRe: i am using console.log() in my code. PinmentorDaveAuld19-Feb-12 1:59 
Questionattr disabled property is not working for FF Pinmemberdayakar_dn12-Feb-12 20:35 
AnswerRe: attr disabled property is not working for FF PinmemberGraham Breach12-Feb-12 23:46 
AnswerRe: attr disabled property is not working for FF Pinmemberjohny1015198114-Feb-12 6:53 
GeneralRe: attr disabled property is not working for FF PinmemberramuAlla1-Mar-12 2:15 
AnswerRe: attr disabled property is not working for FF PinmemberEdward Nutting19-Feb-12 1:34 
QuestionHow can i use backbone.js PinmemberDeepthiTanguturi10-Feb-12 23:02 
AnswerRe: How can i use backbone.js PinmvpRichard MacCutchan11-Feb-12 0:50 
Questionpage loading [modified] PinmemberMember 79044828-Feb-12 21:22 
QuestionNeed Help Setting <img> src attribute PinmemberPianoMan7-Feb-12 6:26 
AnswerRe: Need Help Setting src attribute PinmemberDean Oliver7-Feb-12 7:40 
GeneralRe: Need Help Setting src attribute PinmemberPianoMan7-Feb-12 17:24 
GeneralRe: Need Help Setting src attribute PinmemberDean Oliver7-Feb-12 22:56 
AnswerRe: Need Help Setting src attribute Pinmemberjohny101519817-Feb-12 19:12 
AnswerRe: Need Help Setting src attribute Pinmembertwseitex19-Feb-12 3:50 
QuestionImages Won't display in IE 7 PinmemberPianoMan5-Feb-12 7:27 
AnswerRe: Images Won't display in IE 7 PinmvpRichard MacCutchan6-Feb-12 0:23 
GeneralRe: Images Won't display in IE 7 PinmemberPianoMan6-Feb-12 5:15 
GeneralRe: Images Won't display in IE 7 PinmvpRichard MacCutchan6-Feb-12 5:30 
GeneralRe: Images Won't display in IE 7 - SOLVED PinmemberPianoMan6-Feb-12 5:43 
GeneralRe: Images Won't display in IE 7 - SOLVED PinmvpRichard MacCutchan6-Feb-12 6:31 
AnswerRe: Images Won't display in IE 7 Pinmemberjsc4214-Feb-12 4:41 
AnswerRe: Images Won't display in IE 7 Pinmembertwseitex19-Feb-12 3:59 
QuestionProblem with args.isValid in JS [modified] Pinmemberdayakar_dn1-Feb-12 23:14 
AnswerRe: Problem with args.isValid in JS Pinmemberjohny101519811-Feb-12 23:36 
GeneralRe: Problem with args.isValid in JS Pinmemberdayakar_dn2-Feb-12 0:03 
GeneralRe: Problem with args.isValid in JS Pinmemberjohny101519812-Feb-12 0:10 

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
Web02 | 2.8.150414.1 | Last Updated 19 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid