Forum Moderators: open
function showDocument(){
alert("showDocument");
}
<table class="items">
<tr class="item">
<td class="label">Document:</td>
<td class="data">
<select name="file" onchange="showDocument()" id="file" size="1">
#foreach ($f in $files)
<option value="$f" #if ($rec.docID == $f.id) SELECTED #end> $!f.linkname</option>
#end
</select>
</td>
</tr>
</table>
Any help will be very welcome
Thanks
When you post problems here, please post only the relevant portions of your code. That is, please make your code as simple as possible, containing only the elements necessary to reproduce the problem. When I do that this code works fine for me:
<script type=text/javascript>
function showDocument(){
alert("showDocument");
}
</script>
<select name="file" onchange="showDocument()">
<option>1</option>
<option>2</option>
</select>
[edited by: MichaelBluejay at 8:04 am (utc) on Sep. 24, 2008]