assign control value from javascript

S

soni2926

Hi,
I have a popup window that i need to populate the hidden field in with
the url of the page that called it. I know i can use javascript ->
opener.location to get the url of the page that called the window, how
do i now place this into the value of an hiddenfield and have it
available in the onload of the page?
i tried something like:
<input type="hidden" id="subject" name="subject" runat="server"
value="<script language=javascript>document.write(opener.location')</
script>" />
but that didn't work. Is there any way to do this? Or anyway function
i can call in the onload method to know the page that called the
popup?
Thanks.
 
C

Cowboy \(Gregory A. Beamer\)

For a simple hidden tag, you can find the control via JavaScript (GetByID
comes to mind) and set the value of the control. IT gets more complex with
ASP.NET Server controls, but even those are easy enough to handle by
emitting JavaScript from the control.
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top