k wil voor een web applicatie van mij informatie uitwisselen tussen 2 windows. In het eerste window staat een form met daar in een aantal tekstvelden en het andere scherm is een window met foto's.
Door middel van een klik op de foto moet het tekstveld gevuld worden met een value. Daarvoor heb ik de volgende code
Het formulier ziet er zo uit
Wie kan me helpen om dit werkend te krijgen? Doordat ik window.document gebruik gaat hij in het verkeerde (huidige) venster zoeken en niet in de andere. Maar hoe krijg ik het zo dat hij wel in het andere window zoekt.
Bij voorbaat dank!
Door middel van een klik op de foto moet het tekstveld gevuld worden met een value. Daarvoor heb ik de volgende code
code:
1
| onClick='window.document.main.sForm1.value=plaatje.jpg' |
Het formulier ziet er zo uit
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
| <form method='post'action='' name='main'>
<input type='hidden' name='posted'value='posted'>
<table cellspacing='0' cellpadding='0' border='0' class='noTableBorder'>
<tr>
<td valign='top'><b></b></td>
<td valign='top' width='20'><b></b></td>
<td><input type='hidden' name='iID' value ='' maxlength=40></td>
</tr>
<tr>
<td valign='top'><b>Titel</b></td>
<td valign='top' width='20'><b>:</b></td>
<td><input type='text' name='sTitle' value='Welkom bij Vemotech'
size='15' maxlength='40'> 40</td>
</tr>
<tr>
<td valign='top'><b>Bericht</b></td>
<td valign='top' width='20'><b>:</b></td>
<td><textarea rows='10' cols='50' name='sBericht'>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</textarea>
</td>
</tr>
<tr>
<td valign='top'><b>Foto 1</b></td>
<td valign='top' width='20'><b>:</b></td>
<td><input type='text' name='sFoto1' value='beloved.gif'
size='15' maxlength='40'> <a href='../alt.foto/viewFolders.php?form=sFoto1' target='_blank'>foto overzicht</a></td>
</tr>
<tr>
<td valign='top'><b>Foto 2</b></td>
<td valign='top' width='20'><b>:</b></td>
<td><input type='text' name='sFoto2' value=''
size='15' maxlength='40'> <a href='../alt.foto/viewFolders.php?form=sFoto2' target='_blank'>foto overzicht</a></td>
</tr>
<tr>
<td valign='top'><b>Foto 3</b></td>
<td valign='top' width='20'><b>:</b></td>
<td><input type='text' name='sFoto3' value=''
size='15' maxlength='40'> <a href='../alt.foto/viewFolders.php?form=sFoto3' target='_blank'>foto overzicht</a></td>
</tr>
<tr>
<td valign='top'><b></b></td>
<td valign='top' width='20'><b></b></td>
<td><input type='submit' value='Opslaan'></td>
</tr>
</table></div> |
Wie kan me helpen om dit werkend te krijgen? Doordat ik window.document gebruik gaat hij in het verkeerde (huidige) venster zoeken en niet in de andere. Maar hoe krijg ik het zo dat hij wel in het andere window zoekt.
Bij voorbaat dank!