473,406 Members | 2,549 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,406 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 2282
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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.