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

Variable from a Pop Up Window

Hi folks!

I need capture a variable from a pop up window. In a form, when the user
fill all the fields he have an option to insert an obsevation. So he click a
link that open a pop up window with a TextBox web control and after fill it,
by pressing a OK button the context of this text box return to principal
form. Try to use session method without exit.

How can this be done? Can someone provide code to achieve this.

Thanks
--
Everson Lira
Nov 19 '05 #1
4 1186
how are you opening it? If you are using a ShowModalDialog you can catch when
the page returns. Either read the saved value from where you wrote it or pass
it (session variable perhaps) and read it in on the original page.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Everson Lira" wrote:
Hi folks!

I need capture a variable from a pop up window. In a form, when the user
fill all the fields he have an option to insert an obsevation. So he click a
link that open a pop up window with a TextBox web control and after fill it,
by pressing a OK button the context of this text box return to principal
form. Try to use session method without exit.

How can this be done? Can someone provide code to achieve this.

Thanks
--
Everson Lira

Nov 19 '05 #2
Hi, Curt

Thanks for your reply. I'm opening the pop up window from an simple image
link.
Sorry but don't know about use ShowModalDialog. In the pop up window, when
add the value of the TextBox to a Session, it don't return to the page that
call the pop up. Excuse my English, I'm from Brazil. Thanks in advance.

--
Everson Lira
"Curt_C [MVP]" wrote:
how are you opening it? If you are using a ShowModalDialog you can catch when
the page returns. Either read the saved value from where you wrote it or pass
it (session variable perhaps) and read it in on the original page.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Everson Lira" wrote:
Hi folks!

I need capture a variable from a pop up window. In a form, when the user
fill all the fields he have an option to insert an obsevation. So he click a
link that open a pop up window with a TextBox web control and after fill it,
by pressing a OK button the context of this text box return to principal
form. Try to use session method without exit.

How can this be done? Can someone provide code to achieve this.

Thanks
--
Everson Lira

Nov 19 '05 #3
if you are usign window.ShowModalDialog , when OK is clicked assign

window.returnValue = "value from textbox" before closing the window.

in the parent page you would open the window like

var valueFromPopUp = window.ShowModalDialog(.....);

***********************************************
if using window.open ,you can access the textbox in parent form directly
from popup like below..

window.parent.document.forms[0].ParentTextBoxname.value="ValueOfTextBox";
"Everson Lira" wrote:
Hi folks!

I need capture a variable from a pop up window. In a form, when the user
fill all the fields he have an option to insert an obsevation. So he click a
link that open a pop up window with a TextBox web control and after fill it,
by pressing a OK button the context of this text box return to principal
form. Try to use session method without exit.

How can this be done? Can someone provide code to achieve this.

Thanks
--
Everson Lira

Nov 19 '05 #4
If you are simply opening a second page you will have to force the user to
refresh.
Do a search on ShowModalDialog() and I think you will find this should work
nicely for you instead.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Everson Lira" wrote:
Hi, Curt

Thanks for your reply. I'm opening the pop up window from an simple image
link.
Sorry but don't know about use ShowModalDialog. In the pop up window, when
add the value of the TextBox to a Session, it don't return to the page that
call the pop up. Excuse my English, I'm from Brazil. Thanks in advance.

--
Everson Lira
"Curt_C [MVP]" wrote:
how are you opening it? If you are using a ShowModalDialog you can catch when
the page returns. Either read the saved value from where you wrote it or pass
it (session variable perhaps) and read it in on the original page.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Everson Lira" wrote:
Hi folks!

I need capture a variable from a pop up window. In a form, when the user
fill all the fields he have an option to insert an obsevation. So he click a
link that open a pop up window with a TextBox web control and after fill it,
by pressing a OK button the context of this text box return to principal
form. Try to use session method without exit.

How can this be done? Can someone provide code to achieve this.

Thanks
--
Everson Lira

Nov 19 '05 #5

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

Similar topics

4
by: Chris Beall | last post by:
If you want your code to be bulletproof, do you have to explicitly check for the existence of any possibly-undefined variable? Example: window.outerHeight is defined by some browsers, but not...
2
by: umashd | last post by:
Hi, I am doing a web based project for my graduation. I studied bit of java for backend processesing and javascript for the client. Here is the scenario. In the FORM, I use INPUT TYPE=text...
8
by: nescio | last post by:
hello, i have got a javascript that opens a new window. when i call the javascript function i want to ad a variable. what you see on the pop up depends on the variable. but the variable in...
10
by: mirandacascade | last post by:
O/S: Win2K Vsn of Python:2.4 Based on a search of other posts in this group, it appears as though os.environ is one way to obtain the PATH environment variable. My questions: 1) is it...
23
by: Russ Chinoy | last post by:
Hi, This may be a totally newbie question, but I'm stumped. If I have a function such as: function DoSomething(strVarName) { ..... }
20
by: weston | last post by:
I've got a piece of code where, for all the world, it looks like this fails in IE 6: hometab = document.getElementById('hometab'); but this succeeds: hometabemt =...
6
by: paul | last post by:
HI! How do we send a variable from an Iframe page back to its parent? I have a script that calculates the iframe's window size but I need to know how to send that value back to its parent so I...
5
by: rockdale | last post by:
Hi, all: I have a linkbutton and I use javascript to open another webpage in a new window. I also want to set my session variable value when this linkbutton get clicked. These session variable...
11
by: gg9h0st | last post by:
i saw a code refactorying onload event listener window.onloadListeners=new Array(); window.addOnLoadListener=function(listener) { window.onloadListeners=listener; } why declare the...
1
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
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
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...

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.