Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fancy javascript manipulation
Message
From
14/10/2001 14:56:01
 
 
To
14/10/2001 02:09:06
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00568245
Message ID:
00568309
Views:
20
>Michel,
>
>Maybe you need to initialize a var in the GoGetValue function, always named the same, and set your return value in the new window to the var instead of trying to put it directly into the form field. I think you can reference the var with
window.opener.varname=whatever
>
>Then, in the GoGetValue function, set the field value to the var value. You could optionally pass in a field reference to the function, which could be called like
GoGetValue(document.MyForm.NoMember)
leaving the function generic. The function then would be:
>function GoGetValue(theField)
>{
>  returnValue = '';
>  window.open("MyUrl");
>  theField.value = returnValue;
>}
>
>
>NOTE: I have not tested this, but in theory it should work. My apologies if the syntax is slightly off...

The javascript environment is a stateless environment. Thus, as soon as you call a new window, you don't have any control from that point. Only that new window can control, as per the logic execution, to replace a value when needed. So, theField.value will be executed immediately after the call. Thus, the new window is still loading at that time.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform