|
I have one page that I'm trying to pass a value using Javascript my link from the first page looks like this...
download-form.html?file=hscase
On my recieving page I have a form that has a drop down menu that should list the option associated with hscase instead of the default selected option.
The code on that page looks like this..
in the header I have
<script type="text/javascript">
function setDownloadOption() {
document.downloadForm.file.value = queryString('file');
(document.downloadForm.file.value.length < 1) document.downloadForm.file.value = 'ims40full'
}
</script>
in the body
<body onload="setDownloadOption();">
and my form looks like this..
<form name="downloadForm" action="/intercue_db/fileRequest.html" method="get">
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#dddddd">
<tr>
<td width="116" valign="middle" bgcolor="#eeeeee"><p>Name</p></td>
<td width="390" valign="middle" bgcolor="#eeeeee"><p>
<input type="text" name="name" size="40" tabindex="1">
<font color="red">* </font></p></td>
</tr>
<tr>
<td bgcolor="#dddddd" width="116"><p>Company</p></td>
<td bgcolor="#dddddd" width="390" valign="middle"><p>
<input type="text" name="company" size="40" tabindex="2">
<font color="red">* </font></p></td>
</tr>
<tr>
<td bgcolor="#eeeeee" width="116"><p>Email</p></td>
<td bgcolor="#eeeeee" width="390" valign="middle"><p>
<input type="text" name="email" size="40" tabindex="3">
<font color="red">*</font></p></td>
</tr>
<tr>
<td bgcolor="#dddddd" width="116"><p>Phone</p></td>
<td bgcolor="#dddddd" width="390"><p>
<input type="text" name="phone" size="40" tabindex="4">
<font color="red">*</font></p></td>
</tr>
<tr>
<td bgcolor="#eeeeee" width="116"><p>City</p></td>
<td bgcolor="#eeeeee" width="390"><p>
<input type="text" name="city" size="40" tabindex="5" border="0">
<font color="red">*</font></p></td>
</tr>
<tr>
<td bgcolor="#dddddd" width="116"><p>State/Region</p></td>
<td bgcolor="#dddddd" width="390"><p>
<input type="text" name="state_region" size="40" tabindex="6" border="0">
<font color="red">*</font></p></td>
</tr>
<tr>
<td bgcolor="#eeeeee" width="116"><p>Country</p></td>
<td bgcolor="#eeeeee" width="390"><p>
<select name="country" size="1" tabindex="7">
<option value="AS">American Samoa</option>
<option>Other</option>
</select>
<font color="red">*</font></p></td>
</tr>
<tr>
<td bgcolor="#dddddd" width="116"><p>Selected File</p>
<p> </p></td>
<td bgcolor="#dddddd" width="390"><p>
<select name="file" size="1" tabindex="8">
<option value="imsfile1">File 1<option>
<option selected value="imsfile2">Files 2</option>
<option value="hscase">Health Services Case Study)</option>
<option value="unccase">UNC Case Study </option>
</select>
</p>
<p> </p></td>
</tr>
<tr>
<td colspan="2" bgcolor="#dddddd" width="506"><div align="center">
<h4><font color="#99cccc"><br>
</font>
<input type="button" name="downloadrequest" value="Download" tabindex="10" onclick="validateDownload()">
</h4>
<h4> </h4>
</div></td>
</tr>
</table>
</form>
|
|
|
|
|
|
|
© Copyright codetoad.com 2001-2004 |
|
|