473,396 Members | 1,760 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.

Pop-Up Window - Return data

What would it take to create a pop-up window that displays some graphics
(each with a bit of text). Ideally it would behave such that when a user
clicks on a graphic, the pop-up window disappears and some data (e.g., some
ID value of the graphich clicked) is then returned to the window from which
the pop-up was opened?

Thanks
Nov 18 '05 #1
3 2281
You can use the window.createPopup() method of the web browser or the
window.showModalDialog() or window.showModelessDialog() methods. I've done
what you're asking about with each of them. Search MSDN for the methods and
you'll be on your way.

Dale

"Jeremy" <JA*@2.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
What would it take to create a pop-up window that displays some graphics
(each with a bit of text). Ideally it would behave such that when a user
clicks on a graphic, the pop-up window disappears and some data (e.g., some ID value of the graphich clicked) is then returned to the window from which the pop-up was opened?

Thanks

Nov 18 '05 #2
You're going to need to do most of this client side.
Your 2 pages simply don't exist at the same points in time on the server, so
they cannot communicate directly with eachother on the server.

You can open a new window and pass it values using client side javascript
such as this:
a=window.open('MyPage.aspx?id=123','_new')
There are all kinds of options for setting window properties such as window
size and toolbar visibility.
Here's more info:
http://msdn.microsoft.com/workshop/a...ods/open_0.asp

From that new window you can reference the original parent window and pass
values back to it with this javascript reference:

Here's an example:
window.opener.document.form1.mytextbox.value = 'whatever';

Here's more info:
http://www.mozilla.org/docs/dom/domr...dow_ref77.html

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Jeremy" <JA*@2.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
What would it take to create a pop-up window that displays some graphics
(each with a bit of text). Ideally it would behave such that when a user
clicks on a graphic, the pop-up window disappears and some data (e.g., some ID value of the graphich clicked) is then returned to the window from which the pop-up was opened?

Thanks

Nov 18 '05 #3
Thank you (and DalePres) very much... just the sort of direction I need.

-J
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ul*************@TK2MSFTNGP10.phx.gbl...
You're going to need to do most of this client side.
Your 2 pages simply don't exist at the same points in time on the server, so they cannot communicate directly with eachother on the server.

You can open a new window and pass it values using client side javascript
such as this:
a=window.open('MyPage.aspx?id=123','_new')
There are all kinds of options for setting window properties such as window size and toolbar visibility.
Here's more info:
http://msdn.microsoft.com/workshop/a...ods/open_0.asp
From that new window you can reference the original parent window and pass
values back to it with this javascript reference:

Here's an example:
window.opener.document.form1.mytextbox.value = 'whatever';

Here's more info:
http://www.mozilla.org/docs/dom/domr...dow_ref77.html

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Jeremy" <JA*@2.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
What would it take to create a pop-up window that displays some graphics
(each with a bit of text). Ideally it would behave such that when a user
clicks on a graphic, the pop-up window disappears and some data (e.g.,

some
ID value of the graphich clicked) is then returned to the window from

which
the pop-up was opened?

Thanks


Nov 18 '05 #4

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

Similar topics

1
by: spencer | last post by:
Hi, The code. def buildStackMajor(): for node in dirStackMinor: #print 's is the node...', node dirStackMajor.append(node) dirStackMinor.pop() print 'POP the stack...', len(dirStackMinor)...
6
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the...
2
by: John Hoge | last post by:
I would like to open an exit pop when a user leaves my site, but I don't want to the back button to trigger the pop if the user remains in my site. I'm using the onUnload attribute of the Body...
89
by: Tak-Shing Chan | last post by:
Dear c.l.c regulars, How about codifying a list of acceptable acronyms on c.l.c? <g> <g,d&r> <VBG> AAMOF AFAIAA AFAIAC
11
by: Vijay Kumar R Zanvar | last post by:
> In <pan.2004.04.22.04.06.05.969827@bar.net> "Mac" <foo@bar.net> writes: > > >Is it legal to declare errno after you've included errno.h? > > > >For example: > > > >#include<errno.h> > > >...
24
by: Apotheosis | last post by:
The problem professor gave us is: Write a program which reads two integer values. If the first is less than the second, print the message "up". If the second is less than the first, print the...
25
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a...
4
by: j_depp_99 | last post by:
The program below fails on execution and I think the error is in my pop function but it all looks correct.Also could someone check my code as to why my print function is not working? I havent...
4
by: TBass | last post by:
Hi, I've got a class that uses a std::list to store tags that need to be written out to a device. I've had no problem with the lists in terms of iterating and reading values. My problem is when...
0
by: Gabriel Genellina | last post by:
En Thu, 08 May 2008 09:24:37 -0300, Aspersieman <aspersieman@gmail.comescribió: Use socket.setdefaulttimeout(timeout_in_seconds) before you create the POP3 object; this value will be used by the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...

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.