473,396 Members | 1,921 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,396 software developers and data experts.

Values Sent from Pop-up to Parent Gets Lost...

I'm trying to use a pop-up page to accept user input then send those
values to the parent page to rebind a gridview control, here's the
scenario:

Parent:

<script type="text/javascript">
function OpenWindow()
{
window.open("child.aspx", "Child",
"menubar=0,resizable=0,width=350,height=250,toolba rs=0");
}
function UpdateValues(pValue)
{
document.getElementById('txtValue').value=pValue;
}
</script>

<html>
<body>
...
...
<asp:ImageButton ID="imgSearch" runat="server"
OnClientClick="OpenWindow()" PostBackUrl="javascript:return false;" />
<asp:TextBox id="txtEndDate" runat="server"
EnableViewState="true"></asp:TextBox

(notice that I have disabled postback on the image button by using
"javascript:return false;")
Child:

<script type="text/javascript">
function ReturnValues()
{
window.opener.UpdateValues(3);
window.opener.location='default.aspx';
}
</script>

<html>
<body>
...
...
<asp:Button ID="btnOK" runat="server" Text="OK"
OnClientClick="ReturnValues()" />

I then put a breakpoing on the 1st line of the parent page Page_Load()
event. When the breakpoint stops, I can see the textbox on the parent
page has the value 3, but I can't see the same value from the local
variable window. Also, after pressing F5 and the page loads, value 3 in
the textbox is wiped out.

Can anyone here tell me what's going on?

Dec 8 '06 #1
0 1004

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

Similar topics

4
by: Giobibo | last post by:
I use the following code to send e-mails with PHP: if(@mail(....)) { //Send OK } else { //Send Bad } But how can I verify that a message was really sent (in case of "Sent
2
by: John Smith | last post by:
I have more than 4,000 pieces of email in my Yahoo account. I would like to write a program to download them all. In order to write such a program, I need to know a few things. 1. After I fill...
4
by: Greg Iocco | last post by:
Simple problem, but I've checked the newsgroups and couldn't find an answer. On the main swithboard is a command button to open a report. The report I built is based off a query, and the query...
41
by: Materialised | last post by:
I am writing a simple function to initialise 3 variables to pesudo random numbers. I have a function which is as follows int randomise( int x, int y, intz) { srand((unsigned)time(NULL)); x...
34
by: _libra_ | last post by:
Hi, Can someone tell me how to obtein the values of certain especial characteres like the left arrow or the Start or del key? Thanks.
14
by: Eric Bantock | last post by:
Very basic question I'm afraid. Once an array has been declared, is there a less tedious way of assigning values to its members than the following: myarray=8; myarray=3; myarray=4; myarray=0;...
17
by: jacob navia | last post by:
The section about boolean values should mention <stdbool.h> at least. It is still at the C89 stage... (Section 9)
5
by: Miguel Dias Moura | last post by:
Hello, i have an ASP.net / VB page with a Script (submitValues) and a Form. 1. The form has 20 input texts and a "Submit" button. 2. The script declares 20 variables. The value of each...
2
by: blitzztriger | last post by:
Hello!! how do i insert values into mysql , after parsing a submiting textbox?? I made the arrays, so this should be a basic insertion of them in the db, but something is missing, or in the wrong...
7
by: George Sakkis | last post by:
A situation that often comes up is having to initialize several instance attributes that accept a default value. For a single class, passing the default values in __init__ is fine: class...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.