473,509 Members | 8,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pop-up form sending data to the calling form?

With ASP.NET 2.0

I want to add a nice and sleek feature to my application where the user
typical clicks a button to open a smaller window to enable a search, lets
say for customers or products or whatever.

So far this is easy by adding a script tag and window.open with appropriate
settings.

The challenge comes when the user has searched and selected his item, and
clicks [Ok] in this popup form.
How do I return the values to the calling form, into the appropriate
textboxes?

If this cannot be done directly on the client side, I think this may be done
with a postback of the caller form, but then; how do I force a callback of
the first form (the caller form) when the secondary (the pop-up) closes?

(And yes, I know the search issue can be solved with hiding/showing panels
or views on an asp-form, but I would like to simulate a more windows like
behaviour, if possible)

Bjorn
Jun 30 '07 #1
2 2493
Hello,

maybe my blog post helps you

ASP.NET: How to create a postback on a main page from a popup window
http://aspadvice.com/blogs/joteke/ar...6/15/2340.aspx

Basically you can just set them with script, but you can also do it via
postback. Per my sample, it's totally up to how the script on the main page
is generated.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Bjorn Sagbakken" <bj*****@online.nowrote in message
news:Vo*********************@telenor.com...
With ASP.NET 2.0

I want to add a nice and sleek feature to my application where the user
typical clicks a button to open a smaller window to enable a search, lets
say for customers or products or whatever.

So far this is easy by adding a script tag and window.open with
appropriate settings.

The challenge comes when the user has searched and selected his item, and
clicks [Ok] in this popup form.
How do I return the values to the calling form, into the appropriate
textboxes?

If this cannot be done directly on the client side, I think this may be
done with a postback of the caller form, but then; how do I force a
callback of the first form (the caller form) when the secondary (the
pop-up) closes?

(And yes, I know the search issue can be solved with hiding/showing panels
or views on an asp-form, but I would like to simulate a more windows like
behaviour, if possible)

Bjorn

Jun 30 '07 #2
Thanks. I have saved your blog to my favorites and will try it out later.
It explains a lot, so I think it will be very useful.

Bjorn

"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:uK**************@TK2MSFTNGP02.phx.gbl...
Hello,

maybe my blog post helps you

ASP.NET: How to create a postback on a main page from a popup window
http://aspadvice.com/blogs/joteke/ar...6/15/2340.aspx

Basically you can just set them with script, but you can also do it via
postback. Per my sample, it's totally up to how the script on the main
page is generated.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Bjorn Sagbakken" <bj*****@online.nowrote in message
news:Vo*********************@telenor.com...
>With ASP.NET 2.0

I want to add a nice and sleek feature to my application where the user
typical clicks a button to open a smaller window to enable a search, lets
say for customers or products or whatever.

So far this is easy by adding a script tag and window.open with
appropriate settings.

The challenge comes when the user has searched and selected his item, and
clicks [Ok] in this popup form.
How do I return the values to the calling form, into the appropriate
textboxes?

If this cannot be done directly on the client side, I think this may be
done with a postback of the caller form, but then; how do I force a
callback of the first form (the caller form) when the secondary (the
pop-up) closes?

(And yes, I know the search issue can be solved with hiding/showing
panels or views on an asp-form, but I would like to simulate a more
windows like behaviour, if possible)

Bjorn


Jun 30 '07 #3

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

Similar topics

4
4668
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST =...
1
2236
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
23184
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
2269
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...
15
4128
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
11
2506
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> > > >...
25
4172
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...
7
24923
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element...
4
2547
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...
20
5692
by: merrittr | last post by:
I need some C advice I want to read in string commands from a user when the user enters a \n I want to push it on the stac. Then at some point , if the user enters the word print pop off and print...
0
7237
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
7137
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
7347
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
5656
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
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.