Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fancy javascript manipulation
Message
From
14/10/2001 01:27:47
 
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00568245
Message ID:
00568250
Views:
20
>>Here's an interesting one. A HTML page is calling a javascript which opens a new window. From that opened window, I can then issue something like this:
>>
>>
>>window.opener.Message.To.value=lcMessageMark
>>
>>
>>This works fine as long as the form name and the field name remains the same. And, that will work as long as the form name is Message and that the field name is To.
>>
>>Now, from the original HTML page, I have several calls to this javascript function to store the returned value in various fields. So, for example, before calling the function, I may issue something like this to store the form name and the field name.
>>
>>
>>document.MyForm.Form.value='MyForm'
>>document.MyForm.Field.value='NoMember'
>>GoGetValue()
>>
>>function GoGetValue()
>>{
>>   window.open("MyUrl");
>>}
>>
>>
>>Then, I need a mecanism from the opened window to dynamically assign the returned value in the MyForm.NoMember field.
>>
>>So, I would need something like this:
>>
>>
>>lcForm=window.opener.MyForm.Form.value
>>lcField=window.opener.MyForm.Field.value
>>window.opener.&lcForm.&lcField.value=lcMessageMark
>>
>>
>>But, of course, that syntax is not working. How can I achieve that?
>
>Michel,
>
>Of course ;) I don't know what your are doing, but start with your last line putting as
>
>window.opener.&lcForm..&lcField..value=lcMessageMark
>
>Assuming that that was your problem, this should work. However, you may encounter the .Value not being allowed for this specific assignment (really don't know what this is about; must learn a lot), so instead of .Value you may need the direct assignment to the ControlSource (name). I hope I make myself clear.
>Then, some constructions like these just won't get to work in a normal assignment (I don't have an example at hand), and just must be done like
>
>STORE lcMessageMark TO window.opener.&lcForm..&lcField..value
>
>So, it you are having syntax errors, play around with the above.

This has been posted in Internet and Javascript category and that is javascript code I am looking for.
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
Next
Reply
Map
View

Click here to load this message in the networking platform