You need to create a linking variable between the parent and child _javascript_ windows

Notice the opener vars in the child window

 

 

Parent window

<FORM NAME=TestForm>

<INPUT TYPE=TEXT MAXLENGTH=255 SIZE=25 NAME="linkfield" VALUE="">

<INPUT TYPE=BUTTON NAME="" VALUE="" =  document.TestForm. linkfield; retvalue = window.open('<@APPFILEPATH>lookups.taf?_function=&<@USERREFERENCEARGUMENT>&SVal=' + .value,'retvalue','Width=400,Height=300');">

</FORM>

 

 

Child window

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<title>

<@ARG _function> Search...

</title>

<SCRIPT LANGUAGE="_javascript_">

<!--

// TITLE:           Lookups.taf

// SYNOPSIS            to present a window of lookups based on type passed in

// AUTHOR:       Ben Johansen

// MODIFIED BY:  Ben Johansen

// MODIFIED BY:  Ben Johansen <[EMAIL PROTECTED]>

// MODIFIED ON:  November 22, 2000

// --- Sample input and link

 

this.ValueField   = opener.ValueField;

this.FieldValue    = ValueField.value;

 

function returnValue(RetValue)

{

    ValueField.value = RetValue.value;

    window.close();

}

// -->

</SCRIPT>

</head>

<BODY>

<H2 ALIGN=LEFT><@ARG _function></H2>

<FORM NAME="Lookup" METHOD=POST >

Select <@ARG _function>: <@CHOICELIST NAME="Svalue" TYPE=SELECT OPTIONS="@@ResultArray[*,3]" VALUES="@@ResultArray[*,1]" SIZE=5 SELECTEXTRAS='>

<P>

<INPUT TYPE=SUBMIT NAME="Submit" VALUE="Accept">

<INPUT TYPE=RESET VALUE=Reset>

<INPUT TYPE=BUTTON VALUE=Back >

</FORM>

 

<SCRIPT language="_javascript_">

<!-- Begin _javascript_

function goback()

{

window.location.replace('<@CGI><@APPFILE>?_function=Departments&<@USERREFERENCEARGUMENT>');

}

// -- End _javascript_ -->

</SCRIPT>

 

 

Hope this helps

Ben Johansen - http://www.pcforge.com
Authorized Witango & MDaemon Reseller
Available for Witango Developement

-----Original Message-----
From:
Steve Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 7:54 AM
To:
WiTango List
Subject: Witango-Talk: _javascript_ to Witango

 

Forgive my basic level question but how can I pass a _javascript_ variable to Witango? I'm calling a script that creates a popup and when I call it I pass some parameters. I'd like one of those parameters to be a value that I can assign to a Witango variable that will be used within the popup.

The calling code is:

<A HREF="">"_javascript_:popupwin('popup.taf','returns',750,500);" >"window.status='Returns Information'; return true" >"window.status=' '; return true">Return Policy</A>

and the _javascript_ code is:

function popupwin(file,info,x,y) {
{var fileInfo = file +"?<@USERREFERENCEARGUMENT>";};
var winName = info + "xxxxx";
var xMax = screen.width, yMax = screen.height;
var xSiz = x, ySiz = y;
var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5;
infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos);
}

I want to take the value from the 'info' parameter and assign it to a Witango variable.

Can somebody point me in the right direction?

Thanks,

Steve Smith

Oakbridge Information Solutions
Office: (519) 624-4388
GTA: (416) 606-3885
Fax: (519) 624-3353
Cell: (416) 606-3885
Email: [EMAIL PROTECTED]
Web: http://www.oakbridge.ca

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to