display on the page an item selected with a form drop down

This is a discussion on "display on the page an item selected with a form drop down" within the JavaScript Forum section. This forum, and the thread "display on the page an item selected with a form drop down are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 18th, 2006, 14:02
Junior Member
Join Date: Dec 2005
Age: 25
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
display on the page an item selected with a form drop down

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: Select all
<%
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: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<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: *display chosen postcode here*<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>
Reply With Quote

  #2 (permalink)  
Old Aug 22nd, 2006, 15:05
Junior Member
Join Date: Dec 2005
Age: 25
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Re: display on the page an item selected with a form drop down

can nobody offer any advice or solution wot so eva to this problem??

has anyone passed information from pages within pages on forms using ajax?? can this be done any easier.. please?? someone give me a sniff of relief!
Reply With Quote
Reply

Tags
display, page, item, selected, form, drop, down

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop down form elements 1840dsgn Web Page Design 3 Sep 4th, 2007 19:09
Form Display Issue RichieRichR6 JavaScript Forum 4 Apr 18th, 2007 17:32
My Page does not display in IE! BGarner Web Page Design 2 Feb 18th, 2007 10:23
Use form to display non-preset images...? Mikemc JavaScript Forum 2 Feb 2nd, 2006 00:03
Guide me how to show previously selected item in listbox frmsasp ASP.NET Forum 1 Jan 26th, 2006 14:37


All times are GMT. The time now is 11:29.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43