473,396 Members | 2,024 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.

Javascript popup questions...

I have a usercontrol that contains a datagrid. This grid
lists information from my database. No big deal...this
works fine, and when the user selects an item I have a
popup window appear with the data that the user can
edit. Now when they click submit on the popup window to
save their changes, can I get the datagrid in the
usercontrol on the parent page to reload. I have been
trying to do this for about a year not and I have never
had any luck. If anyone could help me do this I would
greatly appreciate it.
Jul 21 '05 #1
4 1583
Use window.opener on the popup window to access the parent
window. So call window.opener.MyFunction() to call a
javascript function in the parent.

In the function, you can cause a refresh in many ways,
from:
1) using javascript to redirect back to the page again,
but this will not preserve viewstate, right?
2) so you can also accomplish the same thing by calling a
postback:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cpguide/html/cpcongeneratingclient-
sidejavascriptforpostback.asp

Also take a look at this. Basically a tutorial for what
you are trying to do:
http://www.dotnetjunkies.com/Tutoria...C01-4E9C-48E3-
B88C-F6D223A8EB9E.dcik

Jon Paugh

-----Original Message-----
I have a usercontrol that contains a datagrid. This grid
lists information from my database. No big deal...this
works fine, and when the user selects an item I have a
popup window appear with the data that the user can
edit. Now when they click submit on the popup window to
save their changes, can I get the datagrid in the
usercontrol on the parent page to reload. I have been
trying to do this for about a year not and I have never
had any luck. If anyone could help me do this I would
greatly appreciate it.
.

Jul 21 '05 #2
PS: What would really be cool is if something would create
a custom control to do all this stuff...
-----Original Message-----
I have a usercontrol that contains a datagrid. This grid
lists information from my database. No big deal...this
works fine, and when the user selects an item I have a
popup window appear with the data that the user can
edit. Now when they click submit on the popup window to
save their changes, can I get the datagrid in the
usercontrol on the parent page to reload. I have been
trying to do this for about a year not and I have never
had any luck. If anyone could help me do this I would
greatly appreciate it.
.

Jul 21 '05 #3
Well if this works, I may think about it in my spare time...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4
In the old world you can send stuff to and from a window. Something like
closewithreturn, check that on the parent and refresh. Now in .net I thought
all that javascript stuff was supposed to be taboo!

"Nicholas Then" <ni**@unitedagy.com> wrote in message
news:0d****************************@phx.gbl...
I have a usercontrol that contains a datagrid. This grid
lists information from my database. No big deal...this
works fine, and when the user selects an item I have a
popup window appear with the data that the user can
edit. Now when they click submit on the popup window to
save their changes, can I get the datagrid in the
usercontrol on the parent page to reload. I have been
trying to do this for about a year not and I have never
had any luck. If anyone could help me do this I would
greatly appreciate it.

Jul 21 '05 #5

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

Similar topics

1
by: Ben Wan | last post by:
I got 2 error from the following code below... 1. I couldn't load up the picture since the picture is at (C:\company\image\largePic.jpg) 2. I got a page error in my 'index.html' when calling...
2
by: Jeannie | last post by:
I have a popup window which is a slideshow of about 7 images. When the popup window loads, the first image is present and then the viewer can select next or previous to scroll through the rest of...
5
by: Lucian Sandor | last post by:
Hello everyone, While I'm a newbie here, I a not new to google, so please don't send me back, it would be useless. First of all I have to specify I am working on a Blogger.com template, therefore...
12
by: Mark Fox | last post by:
Hello, I am attempting to do something very simple. I have a page MainPage.aspx and a popup window Popup.aspx. When users click on the linkbutton in the popup window I am looking to do some...
2
by: tshad | last post by:
I don't know if this can be done. It is a coordination with my client side vs my server side code. I can create a popup fine: Dim myNextButton As ImageButton =...
4
by: Nicholas Then | last post by:
I have a usercontrol that contains a datagrid. This grid lists information from my database. No big deal...this works fine, and when the user selects an item I have a popup window appear with...
4
by: E | last post by:
I am having trouble with setTimeout working on a second call to the setTimeout function from a second page which is an html page. Here is the scenario. I have a web page and onload it calls a...
13
by: monomaniac21 | last post by:
hi i want to be able to trigger a javascript style popup alert in php (i want a message displayed on the actual page) is this possible?
6
by: den 2005 | last post by:
Hi everybody, Question 1: How do you set the values from server-side to a client-side control or how do you execute a javascript function without a button click event? Question 2: How do you...
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.