I have two separate fields with a drop-down list, one is for User and the second Data. Then I have a button, which would ideally work as an output of the selection of the two drop-down lists. The form should retrieve the file that is relevant to the selection. The file to be opened has always the following format so I was hoping to make use of that: _.csv
Here's the simplified version of what I'm using:
<td align="left"><!-- User/data selector -->
<table border="0">
<tbody>
<tr>
<th align="left">User:</th>
<td>
<select name="users" id="users">
<option value="user1">User 1</option>
<option value="user2">User 2</option>
<option value="user3">User 3</option>
</select>
</td>
</tr>
<tr>
<th align="left">Data:</th>
<td>
<select name="data" id="data">
<option value="data1">Data 1</option>
<option value="data2">Data 2</option>
<option value="data3">Data 3</option>
</select>
</td>
</tr>
<tr>
<td></td>
<td><input type='button' value='Generate Report' onClick='newWindow();'/></td>
</tr>
</tbody>
</table>
So, what I'm struggling with is to know what to write in the function newWindow()
to get the needed 'User' and 'Data' selection to get the correct file. Can you help?
Much appreciated!