Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display on the page an item selected in a form

Status
Not open for further replies.

tonyx666

MIS
Apr 13, 2006
214
GB
ok.. i would like to display on my page what item my user has just selected from the form..

eg. which radio button they just chose, or which drop down menu item they have shown..

the page is here..
http://www.londonheathrowcars.com/ajax/blankquote.asp

u can see the

Pickup: Heathrow Airport

is static and unchanging on the right hand side of the page.

if you choose London Postcode, then a drop down menu appears..

i would like the chosen value of the drop down to be displayed where Destination: is (on the right hand side of the page below Pickup: Heathrow Airport).. similarly i would like the type of car to be displayed next to vehicle.

HOWEVER! i am using ajax and the postcodes and car types are in separate asp pages loaded into containers (table cells)..

they are not found directly on the blankquote.asp page.. will this be a problem

if we can just test just one of the things to see if it works..

basically the quote1.asp page is a drop down menu of London Postcodes populated from my database..

this is the page with the drop down menu.
Code:
<%
set myconn = Server.CreateObject("ADODB.connection")
connection = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &_
Server.MapPath("/_db_import/prices.mdb") & ";"
myconn.open (connection)

set rs=Server.CreateObject("ADODB.recordset")
rs.Open "Select townNAME from tblTOWN", myconn
%>
<script type="text/javascript" src="ajax.js"></script>
<p class="mainbody">2. Select a <b>London Postcode</b>:<br>
    <select class="droppy" name="postcode" onChange="LoadCarContent();">
<option value="">...</option>
<%
if not rs.eof then
do until rs.eof
%>
<option class="grey" value="<%=rs("townName")%>"><%=rs("townName")%></option>
<%
rs.movenext
loop
end if
%>
</select>
</p>

now if we can tell this page to use this value and send it to the bold section of my main page below.. can this be done..

blankquote.asp
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]

<html>
<head>
<title> | </title>

<meta name="description" content="">
<meta name="keywords" content="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="ajax.js"></script>



</head>

<body>
<div id="wrap">
		
		

<div id="bleft">
<h1 class="top">Quick Quote</h1>
<form name="quoteform">


<table width="100%" border="0" cellspacing="0">
  <tr>
    <td id="thecellid"><p class="mainbody">1. Please Choose a Destination:<br><Br>
		<input type="radio" VALUE="v1" name="r1" onMouseOver="style.cursor='pointer'" onclick="LoadPostcodes();">&nbsp;&nbsp;&nbsp;<b>London Postcode</b> (N1, WC2, E14 etc..)<br><br>

		<input type="radio" VALUE="v2" name="r1" onMouseOver="style.cursor='pointer'" onclick="LoadContent2()";>&nbsp;&nbsp;&nbsp;<b>Town / Location</b> (Cambridge, Brighton etc..)<br><br>
		
		<input type="radio" VALUE="v3" name="r1" onMouseOver="style.cursor='pointer'" onclick="LoadAirports()";>&nbsp;&nbsp;&nbsp;<b>UK Airport</b> (Gatwick, Stansted etc..)<br><br>
		
		<input type="radio" VALUE="v4" name="r1" onMouseOver="style.cursor='pointer'" onclick="LoadSeaports()";>&nbsp;&nbsp;&nbsp;<b>UK Seaport</b> (Dover, Harwich etc..)<br><br></td>
  </tr>

  <tr>
    <td id="carcontentid"></td>
  </tr>
</table>
</form>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>


<div id="bright">
<h1 class="top">Your Journey</h1>
<form>
<p class="mainbody">Pickup: <b>Heathrow Airport</b><br><br>
Destination: [b]*display chosen postcode here*[/b]<br><br>Vehicle:<br><br>
<table width="100%" border="0" cellspacing="0">
  <tr>
<td id="buttonid"></td>
  </tr>
</table>


</p>

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</form>

</div>


			
</div>
</body>
</html>

come on the gunners!
 
has nobody got anythin of use to tell me on this matter?

come on the gunners!
 
ok, this is the last time i shall use the 'frowned upon' method of posting to get my question to the top of the list..

can not a single one of you offer me ANY insight wot-so-eva on how i can display an item chosen from a form on the page..

trust me.. ANY help is needed here people

come on the gunners!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top