473,326 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

assign control value from javascript

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.

Apr 25 '07 #1
1 1855
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.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
<so******@yahoo.comwrote in message
news:11**********************@t39g2000prd.googlegr oups.com...
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.
Apr 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: ckerns | last post by:
I want to loop thru an array of controls,(39 of them...defaults = 0). If value is null or non-numeric I want to assign the value of "0". rowString = "L411" //conrol name if (isNaN(eval...
16
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have...
1
by: google | last post by:
It would seem that when I assign an HTML entity to a form text input using "inline" javascript that it will display properly. But when trying to set it via a function call, the entity text shows...
8
by: Sergei | last post by:
Hi, I am displaying modal dialog and passing values from the main form to the modal dialog and back. It works fine but if I used the following syntax on Page_Load(just for testing) in VB to...
6
by: david | last post by:
I try to use "for" loop to retrieve and assign values in web form. The code is in the following. But it can not be compiled. What I want to do is: txtQ1.Text =...
1
nirmalsingh
by: nirmalsingh | last post by:
hai all, how to take client control value in javascript and assign it to server side control? and i need that server side control value in code behind(c#) to save it. how to do this? Thanx in...
5
by: howa | last post by:
Hi, Consider a simple example, e.g. var a = { 'a': 'b', 'c': 'd' }
5
by: lianping | last post by:
Hi, I have a problem to assign a value into text box, below will be my script. Before view my script, let me hv quick explain on what is my problem: I would like to assign Java script value...
3
by: Chris | last post by:
I'm guessing the answer is no, but is it possible to assign an event handler to a control using css? For example, I'd like to assign an onclick handler to every <divthat has a class of "foo"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.