[Javascript] Passing log-in data from a pop-up window to the main window...

Rodney Myers rodney at aflyingstart.net
Wed Jul 10 04:44:27 CDT 2002


Thomas,

You have a choice:

a) Submit the form with METHOD="GET" and TARGET="windowName" where
windowName is the window.name of the main window. By default it will not
have one but you can just write in a script there :

window.name="BRIAN" // or whatever

The ACTION will be a scripted page which will then load into BRIAN with
a query string containing all the data from the form in the popup which
you can then get at as window.location.search

b) Reference the opening window in the popup as self.opener and
functions in it as
self.opener.functionName
This will then allow you to call functions in the main window
self.opener.myFunction(param1,param2,......) // whatever parameters you
need to send.

hth

Rodney


"McCoy, Thomas" wrote:

>  When a Web site is accessed, is it possible to have a small window
> pop up (that asks for user name & password), then pass those variables
> to the site to "log-in" a user?  I know I've seen this somewhere on
> the Web, but I'm not sure if it was done via JavaScript or some other
> language.Any assistance this list can provide is always appreciated
> :)  Sincerely,
> Thomas McCoy





More information about the Javascript mailing list