codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Help with passing querystring  jodtoad at 14:32 on Wednesday, June 09, 2004
 

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>









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Testing file for type of data
•  Running VB6 application as a ASP.NET application
•  login system with asp.net
•  Re: Help: Trouble with z-Index and SELECT lists
•  What is wrong with this ASP codes? It don`t seem to work???
•  Need help with ListBox control
•  Re: Good Javascript/DHTML Reference
•  Re: scrolling table
•  Re: simulation of road traffic


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2004