Unable to get a popup to recognize hidden field ??

A

aaa

I am unable to get a my popup to recognize a hidden field on the calling
page. I have this working on a different page although that page is a tad
simpler. The page I am trying now calls from a templated column of a grid
from a UC but the hidden field that I am calling is on the main page. Here
is the code:

Popup:

window.opener.MainForm.hiddenField.value = 99;
(it states that this object is null or not an object - also I am doing a
RegisterClientScriptBlock with this)


MainPage:

protected System.Web.UI.HtmlControls.HtmlInputHidden hiddenField;


if (hiddenField.Value!="")
{
string str = hiddenField.Value;
}


<input type="hidden" id="hiddenField" name="hiddenField" runat="server">



Any help is appreciated.
 
B

Bruce Barker

most likely your hidden field is contained in another asp.net control, so
its client name is not "hiddenField". view source to see if this is the
problem.

-- bruce (sqlwork.com)
 
J

James Doughty

try using document.getElementbyId('hiddenField').value = 99;

I've come across this problem when I've refernced fields on a page with
user controls.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top