473,405 Members | 2,287 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,405 software developers and data experts.

How to pass a value to a hidden field

Hi, i have an asp.net and vb.net web page i am opening a popup window where the user can select somthing. When the user presses select it is suppose to go back to the original form closing the pop up and processing the value the user has chosen. To do this i am using javascript. The problem is how to you tell the pop up to close and pass the value back to the hidden field in the oiginal form where i can do more processing.

Sorry if this does not make sense
Oct 17 '08 #1
5 2797
gits
5,390 Expert Mod 4TB
it does make sense ;) ... you just need to assign an onchange-event that sets the new selected value to a field in the opener's document. then just use the window.close() method to close the popup window ...

please show what you have tried so far.

kind regards
Oct 17 '08 #2
it does make sense ;) ... you just need to assign an onchange-event that sets the new selected value to a field in the opener's document. then just use the window.close() method to close the popup window ...

please show what you have tried so far.

kind regards
Hello friend window.close may not work in some case specially when you are working in the different frame of the parent page .So, It is always safe to use top.close which will close always the t window which is in the browser where you are working.
Oct 17 '08 #3
gits
5,390 Expert Mod 4TB
thanks to point that out - of course window should refer to the window that should be closed ... you could use it in the parent window or in the popup itself ... so you always should know the correct reference
Oct 17 '08 #4
Hi thanks for you replies. I have got most of it working however, i can't seem to pass a hidden field value to the js function the code is bellow

Code:

this.form.hdnStructureID.value

can someone tell me whats wrong with this as this is the only place where it does not pass a value through. the hdnStructure is a hidden filed
Oct 17 '08 #5
gits
5,390 Expert Mod 4TB
could you search the page where you use this to check that your shown reference is correct? in the browser have a look at the source view, could you post that part of the html-page where this element is located?

kind regards
Oct 18 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Bharat Suneja | last post by:
Hi All, I'm running into issues with passing the distinguishedName of a user as a hidden form field in a form from one page to the result page. Page 1: User enters user name in a form field ...
4
by: Fred | last post by:
Hi, i know how to pass a value from Javascript to ASP with a hidden field into a form and submitting it, or with cookies, but here i have to pass a lot of data in an array. There is a list of...
1
by: james00_c | last post by:
Greetings- I need to pass multiple email addresses to a "sendto" hidden field in a form. I need to do that because "CC" and "BCC" are not an option. One address webmaster@xyz.com would be...
4
by: GavMc | last post by:
Hello I am new to internet programming and wonder if anyone can help me with this.... I am trying to pass a hidden field value on a form into another field on the form so that it can then be...
3
by: Henke | last post by:
How can data be passed to the server when an event is fired in client-side jscript, ie on a drop event? I have tried using hidden fields and submitting the page, but for some reason I can't access...
10
by: Frank Rizzo | last post by:
Ok, this is probably so simple... Anyway, I'd like to pass a value in the hidden variable. I have code like this: <form...> <input type="Hidden" name="zzz" value="1"> ... </form> I want...
7
by: Andy | last post by:
Hi, I have a complicated question that I'm hoping someone can help me out with. I have a webpage that contains a plug-in. This plug-in can communicate/pass data with the webpage that contains it...
7
by: bonnie.tangyn | last post by:
Hello All Could anyone give me some suggestions on passing a long string between ASP pages? I have three asp pages - h_email content.asp, h_process_email.asp and h_preview_email.asp In the...
9
by: JRough | last post by:
I tried to pass the $result from a mysql_query in a url like this line Header("Location:clm_historyXL.php?_result=".$result); but on the redirect location clm_history.php page I get an error on...
9
by: nicnac | last post by:
Hi, I'm self learning javascript - so any pointers are welcomed!! I have an issue passing a form and array from one function to another. I tried many variations ! I can't get this to work...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.