Merçi, beaucoup!
T
SAM wrote:
> tomb a écrit :
>> I only understand the popup mechanism on an elementary level, but my
>> task is a bit more complex than that. If anyone can provide a
>> guideline or point me to one I would be most appreciative.
>>
>> I would like to add functionality like an email address book that
>> opens in a popup, and then the selected email addresses are populated
>> to the main window form text box. I can open the popup, and I can
>> populate the list of email addresses, but I don't get how to interact
>> between the two windows and send the results back to the main window.
>
> In the popup
>
> <select onchange="var k = this.selectedIndex;
> if(k==0) alert('Make a choice in this list');
> else {
> opener.document.forms[0].email.value = this.options[k].value;
> self.close();
> }">
> <option selected>e-mail contacts</options>
> <option value="">Tartempion Marc</option>
> <opt ...
> </select>
>
>
> In the main window
>
> <form ... >
> <p>e-mail : <input type=text name="email">
> <a href="adBook.htm" onclick="adBook();" target="adbk">address book</a>
>
> <script type="text/javascript">
> function adBook() {
> if(typeof(truc)=='undefined' || truc.closed)
> truc = window.open('','adbk','width=300,height=500');
> truc.focus();
> }
> </script>
>
|