codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  selecting information from pop up window  Archive Import (diego) at 20:55 on Tuesday, July 15, 2003
 

for example:
in 1stpage.asp i have textbox beside of it is a link if u click it pop up window will appear and display the information and if i choose one and click the submit button, it will display in text box in istpage.asp

pls. help
thanks

  Re: selecting information from pop up window  Troy Wolf at 15:59 on Friday, August 01, 2003
 

I assume you know how to pop the second window. So you want to know how to pass the selected value back to the textbox in the first page. Right?

Of course, there is always more than one way to skin a cat, but here`s what I like to do. (I use this all the time in my admin tools where the user needs to select an account or select a product or a warehouse, etc. They click a lookup icon, and up pops the list. When they pick on, I need to pass the value back to the main window.

In the second page have a function similar to this:

function ReturnThrow(fVal) {
self.opener.ReturnCatch(fVal);
self.close();
}

This passes the value (fVal) back to the function in page 1 and closes the popup window.

In the first page, have a function similar to this:

function ReturnCatch(fVal) {
/* Do what you want with the value here.
For example, you could place the value in a textbox.
*/
document.forms[0].AccountID.value = fVal;
}
Troy Wolf: site expert
Shiny Solutions









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: onload event
•  Active Widgets
•  Re: onmouseover change image and text
•  Line Printer Interface
•  import contacts of msn/yahoo
•  Call windows apps from web apps
•  Re: ASP.NET web controls
•  netscape 6 browser problem
•  Re: Print .doc file from the website using System.Diagnostics.Process


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005