Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fancy javascript manipulation
Message
De
14/10/2001 14:56:01
 
 
À
14/10/2001 02:09:06
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00568245
Message ID:
00568309
Vues:
21
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform