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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with form query string, works but not w3c compliant

Status
Not open for further replies.

vasox56

Technical User
May 8, 2007
75
GB
my form is working but it is not w3c compliant. can someone just help me send the values to the next page in a compatible way..

have a look here..
http://validator.w3.org/check?uri=h...charset=(detect+automatically)&doctype=Inline


here is the page..
thanks for ur help

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<% 
DIM myconn, connection, rs, thisvar, placevar

DIM sTempVar

sTempVar = "&#"

thisvar = Request.QueryString("direction")
placevar = request.querystring("myplace")

set myconn = Server.CreateObject("ADODB.connection")
connection = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &_
Server.MapPath("/_db_import/newprice.mdb") & ";"
myconn.open (connection)

set rs=Server.CreateObject("ADODB.recordset")
rs.Open "SELECT tblPLACE.placeNAME, tblQUOTE.salPRICE, tblQUOTE.estPRICE, tblQUOTE.mpvPRICE, tblQUOTE.exePRICE, tblQUOTE.nstPRICE FROM tblPLACE INNER JOIN tblQUOTE ON tblPLACE.placeID = tblQUOTE.placeID where tblPLACE.placeID = '" & placevar & "' ", myconn

Dim newsalPRICE

if CLng(trim(rs("salPRICE"))) < 41 then
	 newsalPRICE = (CLng(trim(rs("salPRICE"))) *2) - 2
else
if CLng(trim(rs("salPRICE"))) < 51 then
	 newsalPRICE = (CLng(trim(rs("salPRICE"))) *2) - 3
else
if CLng(trim(rs("salPRICE"))) < 71 then
	 newsalPRICE = (CLng(trim(rs("salPRICE"))) *2) - 4
else
if CLng(trim(rs("salPRICE"))) < 91 then
	 newsalPRICE = (CLng(trim(rs("salPRICE"))) *2) - 5
else
if CLng(trim(rs("salPRICE"))) > 91 then
	 newsalPRICE = (CLng(trim(rs("salPRICE"))) *2) - 7
end If
end If
end If
end If
end If

Dim newestPRICE

if CLng(trim(rs("estPRICE"))) < 41 then
	 newestPRICE = (CLng(trim(rs("estPRICE"))) *2) - 2
else
if CLng(trim(rs("estPRICE"))) < 51 then
	 newestPRICE = (CLng(trim(rs("estPRICE"))) *2) - 3
else
if CLng(trim(rs("estPRICE"))) < 71 then
	 newestPRICE = (CLng(trim(rs("estPRICE"))) *2) - 4
else
if CLng(trim(rs("estPRICE"))) < 91 then
	 newestPRICE = (CLng(trim(rs("estPRICE"))) *2) - 5
else
if CLng(trim(rs("estPRICE"))) > 91 then
	 newestPRICE = (CLng(trim(rs("estPRICE"))) *2) - 7
end If
end If
end If
end If
end If

Dim newmpvPRICE

if CLng(trim(rs("mpvPRICE"))) < 41 then
	 newmpvPRICE = (CLng(trim(rs("mpvPRICE"))) *2) - 2
else
if CLng(trim(rs("mpvPRICE"))) < 51 then
	 newmpvPRICE = (CLng(trim(rs("mpvPRICE"))) *2) - 3
else
if CLng(trim(rs("mpvPRICE"))) < 71 then
	 newmpvPRICE = (CLng(trim(rs("mpvPRICE"))) *2) - 4
else
if CLng(trim(rs("mpvPRICE"))) < 91 then
	 newmpvPRICE = (CLng(trim(rs("mpvPRICE"))) *2) - 5
else
if CLng(trim(rs("mpvPRICE"))) > 91 then
	 newmpvPRICE = (CLng(trim(rs("mpvPRICE"))) *2) - 7
end If
end If
end If
end If
end If

Dim newexePRICE

if CLng(trim(rs("exePRICE"))) < 41 then
	 newexePRICE = (CLng(trim(rs("exePRICE"))) *2) - 2
else
if CLng(trim(rs("exePRICE"))) < 51 then
	 newexePRICE = (CLng(trim(rs("exePRICE"))) *2) - 3
else
if CLng(trim(rs("exePRICE"))) < 71 then
	 newexePRICE = (CLng(trim(rs("exePRICE"))) *2) - 4
else
if CLng(trim(rs("exePRICE"))) < 91 then
	 newexePRICE = (CLng(trim(rs("exePRICE"))) *2) - 5
else
if CLng(trim(rs("exePRICE"))) > 91 then
	 newexePRICE = (CLng(trim(rs("exePRICE"))) *2) - 7
end If
end If
end If
end If
end If

Dim newnstPRICE

if CLng(trim(rs("nstPRICE"))) < 41 then
	 newnstPRICE = (CLng(trim(rs("nstPRICE"))) *2) - 2
else
if CLng(trim(rs("nstPRICE"))) < 51 then
	 newnstPRICE = (CLng(trim(rs("nstPRICE"))) *2) - 3
else
if CLng(trim(rs("nstPRICE"))) < 71 then
	 newnstPRICE = (CLng(trim(rs("nstPRICE"))) *2) - 4
else
if CLng(trim(rs("nstPRICE"))) < 91 then
	 newnstPRICE = (CLng(trim(rs("nstPRICE"))) *2) - 5
else
if CLng(trim(rs("nstPRICE"))) > 91 then
	 newnstPRICE = (CLng(trim(rs("nstPRICE"))) *2) - 7
end If
end If
end If
end If
end If
%>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>London Heathrow Cars | Airport Transfer Service | Private Hire Minicab</title>

<link rel="stylesheet" type="text/css" href="22style.css" media="all" />
<script type="text/javascript" src="places.js"></script>
<script type="text/javascript" src="quotecheck.js"></script>
<script type="text/javascript" src="external.js"></script>

</head>

<body>

<div id="wrap" class="clearfix">

	<div id="top">
		<img class="logo" src="xxlogo.jpg" alt="London Heathrow Cars Header" />
	</div>

	<div id="bleft">
	<br />
	<form name="quoteform" method="post" action="1-direct.asp" onsubmit="return IsFormComplete()">
	<table border="0" width="225" id="table1" cellspacing="0" cellpadding="0">
		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2">
				<iframe src="[URL unfurl="true"]http://free.timeanddate.com/clock/ii1v03d/n136/tluk/fs12/fcfff/tc4a4c4a/pc4a4c4a/ahl/avt/ftb/tt0/td2/th1/ts1/tb4"[/URL] frameborder="0" width="186" height="32"></iframe>
			</td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2"></td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2">
				<p class="heading">Quick Quote</p>
				<p class="left">If your destination is not listed please use our <a class="baitlink" href="transfer-enquiry.asp">Enquiry Form</a>.</p>
			</td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2"></td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2">
					<select class="firstlist" id="FirstList" name="FirstList" onchange="switchList(this);">
						<option value="">Please Select..</option>
						<option value="C1">London Postcodes</option>
					    <option value="C2">Greater London</option>
					</select>
			</td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2">
				<select class="secondlist" id="SecondList" name="SecondList">
				<option></option>
				</select>
				
			</td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2"></td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2">
			
				<table border="0" width="205" id="table2" cellspacing="0" cellpadding="0">
					<tr>
						<td width="15">	
							<p class="tofrom">
								<input style="margin-left:0px;" type="radio" value="V1" name="way" />
							</p>
						</td>
						<td width="90">
							<p class="tofrom"><b>FROM</b> Heathrow</p>
						</td>
						<td width="90" rowspan="2">
							<input class="gobutton" value="GO >>" name="B1" type="submit" />
						</td>
					</tr>
					<tr>
						<td width="15">	
							<p class="tofrom">
								<input style="margin-left:0px;" type="radio" value="V2" name="way" />
							</p>
						</td>
						<td width="90">
							<p class="tofrom"><b>TO</b> Heathrow</p>
						</td>
					</tr>
				</table>
			</td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2"></td>
		</tr>

		<tr>
			<td width="20">&nbsp;</td>
			<td width="205" colspan="2"></td>
		</tr>



	</table>
	</form>
	<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
	</div>

	<div id="bright">
		<ul id="nav">
            <li class="outerLi"><a href="index.asp">Home</a></li>
            <li class="outerLi"><a href="transfer-service.asp">Services</a>
				<ul>
                    <li><a href="airport-transfers.asp">Airport Transfers</a></li>
					<li><a href="seaport-transfers.asp">Seaport Transfers</a></li>
					<li><a href="executive-chauffeur.asp">Executive Travel</a></li>
					<li><a href="day-hire.asp">Day Hire</a></li>
					<li><a href="london-tour.asp">Tour of London</a></li>
                </ul>
			</li>
			<li class="outerLi"><a href="heathrow-accounts.asp">Accounts</a></li>
            <li class="outerLi"><a href="transfer-fleet.asp">Fleet</a></li>
			<li class="outerLi"><a href="transfer-faqs.asp">Faqs</a></li>
            <li class="outerLi"><a href="transfer-booking.asp">Bookings</a></li>
			<li class="outerLi"><a href="transfer-enquiry.asp">Enquiries</a></li>
        </ul>


		<p class="headinglb">Heathrow to <%=rs("placeNAME")%></p>
		<p class="mainpage">Listed below are the details of your journey. Our drivers will 'Meet and Greet' you in the arrivals hall holding a nameboard of your choice.</p>
		<br /><br />


<table border="0" id="table3" cellspacing="0" cellpadding="0">
	<tr>
		<td width="20">&nbsp;</td>
		<td valign="bottom"><img alt="Saloon Vehicle" border="0" src="sal2.gif" width="86" height="53" style="margin-bottom:10px;" /></td>
		<td valign="top"><p class="quotefont"><b>SALOON CAR</b></p>


<table border="0" id="table4" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="bottom"><img alt="Passengers" border="0" src="man.jpg" style="margin-left:20px;margin-right:5px;" width="11" height="30" /></td>
		<td valign="bottom"><p class="mainnb">x4</p></td>
		<td valign="bottom">
		<img alt="Suitcases" border="0" src="suitcase.jpg" style="margin-right:5px;margin-left:5px;" width="24" height="20" /></td>
		<td valign="bottom"><p class="mainnb">x3</p></td>
		<td valign="bottom">
		<img alt="Hand Luggages" border="0" src="hand.jpg" style="margin-right:5px;margin-left:5px;" width="18" height="15" /></td>
		<td valign="bottom"><p class="mainnb">x2</p></td>
	</tr>
</table>
		</td>
		<td valign="top"><p class="mainpage">Single<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(rs("salPRICE"))%></font></b><br /></p><form style="margin-left:20px;" action="online-booking1.asp?Price=<%=sTempVar & "163;" & trim(rs("salPRICE"))%>&Postcode=<%= rs("placeNAME")%>&FCar=Saloon" method="POST"><p><input type="hidden" name="Car" value="Saloon"></p><p><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></form></td>
		<td valign="top"><p class="mainpage">Return<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(newsalPRICE)%></font></b><br /><form style="margin-left:20px;" action="online-booking1.asp?Price=<%=sTempVar & "163;" & trim(newsalPRICE)%>&Postcode=<%= rs("placeNAME")%>&FCar=Saloon" method="POST"><p><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td width="20">&nbsp;</td>
	</tr>

<tr><td><br /><br /></td></tr>

	<tr>
		<td width="20">&nbsp;</td>
		<td valign="bottom"><img alt="Estate Vehicle" border="0" src="est.gif" width="90" height="42" style="margin-bottom:10px;" /></td>
		<td valign="top"><p class="quotefont"><b>ESTATE CAR</b></p>


<table border="0" id="table5" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="bottom"><img alt="Passengers" border="0" src="man.jpg" style="margin-left:20px;margin-right:5px;" width="11" height="30" /></td>
		<td valign="bottom"><p class="mainnb">x4</p></td>
		<td valign="bottom">
		<img alt="Suitcases" border="0" src="suitcase.jpg" style="margin-right:5px;margin-left:5px;" width="24" height="20" /></td>
		<td valign="bottom"><p class="mainnb">x4</p></td>
		<td valign="bottom">
		<img alt="Hand Luggages" border="0" src="hand.jpg" style="margin-right:5px;margin-left:5px;" width="18" height="15" /></td>
		<td valign="bottom"><p class="mainnb">x4</p></td>
	</tr>
</table>
		</td>
		<td valign="top"><p class="mainpage">Single<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(rs("estPRICE"))%></font></b><br /><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td valign="top"><p class="mainpage">Return<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(newestPRICE)%></font></b><br /><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td width="20">&nbsp;</td>
	</tr>

<tr><td><br /><br /></td></tr>

	<tr>
		<td width="20">&nbsp;</td>
		<td valign="bottom"><img alt="People Carrier" border="0" src="mpv.gif" width="90" height="49" style="margin-bottom:10px;" /></td>
		<td valign="top"><p class="quotefont"><b>PEOPLE CARRIER</b></p>


<table border="0" id="table6" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="bottom"><img alt="Passengers" border="0" src="man.jpg" style="margin-left:20px;margin-right:5px;" width="11" height="30" /></td>
		<td valign="bottom"><p class="mainnb">x5</p></td>
		<td valign="bottom">
		<img alt="Suitcases" border="0" src="suitcase.jpg" style="margin-right:5px;margin-left:5px;" width="24" height="20" /></td>
		<td valign="bottom"><p class="mainnb">x5</p></td>
		<td valign="bottom">
		<img alt="Hand Luggages" border="0" src="hand.jpg" style="margin-right:5px;margin-left:5px;" width="18" height="15" /></td>
		<td valign="bottom"><p class="mainnb">x3</p></td>
	</tr>
</table>
		</td>
		<td valign="top"><p class="mainpage">Single<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(rs("mpvPRICE"))%></font></b><br /><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td valign="top"><p class="mainpage">Return<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(newmpvPRICE)%></font></b><br /><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td width="20">&nbsp;</td>
	</tr>

<tr><td><br /><br /></td></tr>

	
	<tr>
		<td width="20">&nbsp;</td>
		<td valign="bottom"><img alt="Executive Car" border="0" src="exe.gif" width="90" height="53" style="margin-bottom:10px;" /></td>
		<td valign="top"><p class="quotefont"><b>EXECUTIVE CAR</b></p>


<table border="0" id="table7" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="bottom"><img alt="Passengers" border="0" src="man.jpg" style="margin-left:20px;margin-right:5px;" width="11" height="30" /></td>
		<td valign="bottom"><p class="mainnb">x4</p></td>
		<td valign="bottom">
		<img alt="Suitcases" border="0" src="suitcase.jpg" style="margin-right:5px;margin-left:5px;" width="24" height="20" /></td>
		<td valign="bottom"><p class="mainnb">x3</p></td>
		<td valign="bottom">
		<img alt="Hand Luggages" border="0" src="hand.jpg" style="margin-right:5px;margin-left:5px;" width="18" height="15" /></td>
		<td valign="bottom"><p class="mainnb">x2</p></td>
	</tr>
</table>
		</td>
		<td valign="top"><p class="mainpage">Single<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(rs("exePRICE"))%></font></b><br /><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td valign="top"><p class="mainpage">Return<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(newexePRICE)%></font></b><br /><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td width="20">&nbsp;</td>
	</tr>

<tr><td><br /><br /></td></tr>

	
	<tr>
		<td width="20">&nbsp;</td>
		<td valign="bottom"><img alt="Minivan" border="0" src="nst.gif" width="90" height="55" style="margin-bottom:10px;" /></td>
		<td valign="top"><p class="quotefont"><b></b></p>


<table border="0" id="table8" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="bottom"><img alt="Passengers" border="0" src="man.jpg" style="margin-left:20px;margin-right:5px;" width="11" height="30" /></td>
		<td valign="bottom"><p class="mainnb">x7</p></td>
		<td valign="bottom">
		<img alt="Suitcases" border="0" src="suitcase.jpg" style="margin-right:5px;margin-left:5px;" width="24" height="20" /></td>
		<td valign="bottom"><p class="mainnb">x8</p></td>
		<td valign="bottom">
		<img alt="Hand Luggages" border="0" src="hand.jpg" style="margin-right:5px;margin-left:5px;" width="18" height="15" /></td>
		<td valign="bottom"><p class="mainnb">x2</p></td>
	</tr>
</table>
		</td>
		<td valign="top"><p class="mainpage">Single<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(rs("nstPRICE"))%></font></b><br /><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td valign="top"><p class="mainpage">Return<b>&nbsp;&nbsp;<font style="font-size:12pt;"><%=sTempVar & "163;" & trim(newnstPRICE)%></font></b><br /><input style="margin-top:5px;margin-bottom:5px;margin-left:0px;background-color:#666666;font-weight:bold;font-size:12px;font-family:arial;color:white;width:80px;height:27px;" type="submit" value="Book Now" /></p></td>
		<td width="20">&nbsp;</td>
	</tr>
	</table>









<%
rs.Close
Set rs = Nothing
myconn.Close
Set myconn = Nothing
%>		

		<br />

		<hr style="margin-left:20px;margin-right:20px;" />
		<br />

		<img style="margin-left:20px;" src="images/paypal.gif" alt="paypal" />
		<img alt="visa" style="margin-left:12px;" src="images/cards/visa.jpg" />
		<img alt="mastercard" style="margin-left:10px;" src="images/cards/mastercard.jpg" />
		<img alt="american express" style="margin-left:10px;" src="images/cards/amex.jpg" />
		<img alt="maestro" style="margin-left:10px;" src="images/cards/maestro.jpg" />
		<img style="margin-left:10px;" src="images/cards/electron.jpg" alt="electron" />
		<img alt="solo" style="margin-left:10px;" src="images/cards/solo.jpg" />

		<br /><br />
	</div>

</div>

</body>

</html>
 
sorry for posting my whole page.. ill be more specific..

my page is fully compliant, the only thing that isnt happy is the form action script.

ive tried replacing the '&', but i still think the statement has problems..

Code:
action="online-booking1.asp?Price=<%=sTempVar & "163;" & trim(rs("salPRICE"))%>&ampPostcode=<%= rs("placeNAME")%>&ampFCar=Saloon"

basically i want the three values to arrive at my next page as..

Postcode
Price
FCar

if someone could give me a hand here i would appreciate it.

my validation failed on 4 errors.. all on the above line..

http://validator.w3.org/check?uri=h...om/from-heathrow.asp?direction=V1&myplace=p17
 
i see.. the comma.. let me get right on that
 
yes.. thank you for that..

i havent slept that much in the last 72 hours.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top