Setting up my form .asp

0 views
Skip to first unread message

relvis

unread,
Feb 29, 2008, 9:12:42 PM2/29/08
to reCAPTCHA
Here is my code, can someone paste in the capture code where it should
go? And do i need to install anything else?


<% @Language = VBScript %>
<% Response.Expires = -1 %>
<!-- #include file="./sharedcode/sitewidevar.asp"-->
<!-- include File="modellistpopulate.asp" -->
<!-- include virtual="/sharedcode/connectstring.asp" -->
<!-- #include file="./header.asp"-->
<%
dim SalesPerson
dim RequestString
dim VIN
VIN = ""

SalesPerson = Trim(Request.QueryString("SalesPerson"))
StockNumber = Trim(Request.QueryString("StockNumber"))
VIN = Trim(Request.QueryString("VIN"))

dim Error, ErrorMessage

Error = Request.QueryString("error")
ErrorMessage = ""

Select case Error
Case "needemail"
ErrorMessage = "Please enter a valid email address."
Case "needsalespersontoomany"
ErrorMessage = "To process this request, we need to know the sales
person you wish to contact. If you do not have a salesperson, please
select the ""Request new or pre-owned salesperson."""
Case "needsalesperson"
ErrorMessage = "To process the request, we need to know which
salesperson you wish to contact."
end select

ShowBackGround = "False"

if DualSalesDepartments = True then
RequestString = "Request a new car sales consultant"
else
RequestString = "Request a sales consultant"
end if

Header
%>
<html>
<head>
<meta http-equiv="keywords" content="used cars ny,used cars on long
island, used cars in new york, used car ny,dealerships in new
york,cars for sale in new york,sale, car sales in New York,used cars
nyc , classic cars for sale New York, long island cars for sale, mazda
dealer suffolk county,nissan dealers ny, used cargo vans for sale Long
Island, rv dealer queens ny,new york cargo trailer,cargo vans Long
Island, mobile homes, rv's for sale ny, car dealers long island ny,
bad credit, no credit,special financing, autoloans,bad credit car
financing, car loans bad credit">
<meta http-equiv="description" content="used cars on long island, long
island used cars, used cars ny, used cars in new york, used car ny,
used cars nyc ,ny used car, mazda dealer suffolk county,nissan dealers
ny, cargo vans for sale Long Island, rv dealers ny,new york cargo
trailer,cargo vans Long Island, mobile homes, rv's for sale ny, car
dealers long island ny,bad credit, no credit,special financing,
autoloans, bad credit car financing, car loans bad credit">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">

<TITLE>&nbsp;Used Cars New York Dealers Used Cars Long Island
Dealership</TITLE>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css">
<!--
body, td, th {
font-family: Tahoma;
font-size: 11px;
color: 494848;
}
img{border:0px none;}
a {
font-family: Tahoma;
font-size: 11px;
color: 494848;
}
a:visited {
color: 494848;
}
a:hover {
color: 494848;
}
a:active {
color: 494848;
}
-->
</style>
<script language="Javascript">
/*
==================================================================
LTrim(string) : Returns a copy of a string without leading spaces.
==================================================================
*/
function LTrim(str)
/*
PURPOSE: Remove leading blanks from our string.
IN: str - the string we want to LTrim
*/
{
var whitespace = new String(" \t\n\r");

var s = new String(str);

if (whitespace.indexOf(s.charAt(0)) != -1) {
// We have a string with leading blank(s)...

var j=0, i = s.length;

// Iterate from the far left of string until we
// don't have any more whitespace...
while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
j++;

// Get the substring from the first non-whitespace
// character to the end of the string...
s = s.substring(j, i);
}
return s;
}

/*
==================================================================
RTrim(string) : Returns a copy of a string without trailing spaces.
==================================================================
*/
function RTrim(str)
/*
PURPOSE: Remove trailing blanks from our string.
IN: str - the string we want to RTrim

*/
{
// We don't want to trip JUST spaces, but also tabs,
// line feeds, etc. Add anything else you want to
// "trim" here in Whitespace
var whitespace = new String(" \t\n\r");

var s = new String(str);

if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
// We have a string with trailing blank(s)...

var i = s.length - 1; // Get length of string

// Iterate from the far right of string until we
// don't have any more whitespace...
while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
i--;


// Get the substring from the front of the string to
// where the last non-whitespace character is...
s = s.substring(0, i+1);
}

return s;
}

/*
=============================================================
Trim(string) : Returns a copy of a string without leading or trailing
spaces
=============================================================
*/
function Trim(str)
/*
PURPOSE: Remove trailing and leading blanks from our string.
IN: str - the string we want to Trim

RETVAL: A Trimmed string!
*/
{
return RTrim(LTrim(str));
}

function checkValues()
{
var nameOK = false;
var emailOK = false;
var phoneOK = false;

if (Trim(document.forms[0].name.value).length > 0)
{
nameOK = true;
} else
{
alert("Please enter your name.");
return false;
}

var email = Trim(document.forms[0].email.value);
if (email.length > 0)
{
for (var i = 0; i < email.length; i++)
{
if ((email.charAt(i) == '@') && (i != 0))
{
for (var j = (i + 1); j < email.length; j++)
{
if ((email.charAt(j) == '.') && (j != (email.length - 1)) && (j !
= (i + 1)))
{
emailOK = true;
}
}
}
}

if (!emailOK)
{
alert("Your email must be in the format na...@domain.com");
return false;
}
} else
{
alert("Please enter your email address.");
return false;
}

if (Trim(document.forms[0].dayphone.value).length >= 7)
{
phoneOK = true;
} else
{
alert("Please enter a daytime phone number with at least 7
digits.");
return false;
}

return nameOK && emailOK && phoneOK;
}
</script>
</head>


<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0
MARGINHEIGHT=0 rightmargin="0" bottommargin="0">
<center>
<!-- Str: <%= strConn %> -->
<!-- Begin Body -->
<table width="770" border="0" cellpadding="1" cellspacing="0"
height="120">
<%
if (len(StockNumber) = 0) and (len(VIN) = 0) then
%>
<tr bgcolor="#FFFFFF">
<td height="56"><div class="txt2" style="width: 768; height: 38">

<p align="left"><font
color="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Find used cars long island used cars new york used car dealers
allnycars all ny cars car dealers new york
dealers.</font></p>
<div align="center"> </div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
By filling out this form, you are requesting information from a dealer
regarding your new or used car search.<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
If you wish to be contacted at a certain number or specific time of
day, please inform us by using the comments box.<hr></div>
</td>
</tr>
<%
end if
%>
</table>
<%'******************************************
If ErrorMessage <> "" then
Response.Write "<table><tr>"
Response.Write "<td><font color=""#cc0033"" size=""1""
style=""text-decoration:none"" face=""verdana,helvetica"">" &
ErrorMessage & "</font></td>"
Response.Write "</tr></table>"
End if
'*******************************************
%>
<table width="770" align="center" cellspacing="0" cellpadding="4"
border="0">
<form action="salesrotate.asp" method="post" onSubmit="return
checkValues()">
<!-- <tr>
<td valign="top">
<font color="#<%=BodyFontColor%>"
size="<%=BodyFontSize%>" face="<%=BodyFontFace%>">
<b>
<font size="1" color="#<
%=BodyAsteriskColor%>" face="verdana">
*
</font>
To
</b>
:
</font>
</td> -->
<%'********************
' if SalesPerson = "" then
%>
<!-- <td colspan="3" valign="top">
<table>
<tr>
<td colspan="3">
<font color="#<%=BodyFontColor
%>" size="<%=BodyFontSize%>" face="<%=BodyFontFace%>">
<b>
Already have a sales
consultant?
</b>
</font>
</td>
</tr>
<tr>
<td>
<%
dim ContactPage
ContactPage = "newsales"
'PopulateList(ContactPage)

%>
</td>
<td>
<%
if DualSalesDepartments =
"True" then
ContactPage =
"preownedsales"
PopulateList(ContactPage)
end if
%>
</td>
<td valign="top">
<a
href="meetsales.asp">
<img src="<%=ImagePath%>/
facewithname.gif" alt="Put a face with a name" height="17" width="65"
align="left" hspace="0" vspace="0" border="0">
</a>
</td>
</tr>
<tr>
<td colspan="3">
<font color="#<
%=BodyHeaderFontColor%>" size="<%=BodyFontSize%>" face="<%=BodyFontFace
%>">
<b>
or
</b>
</font>
</td>
</tr>
<tr>
<td colspan="3">
<font color="#<%=BodyFontColor
%>" size="<%=BodyFontSize%>" face="<%=BodyFontFace%>">
<b>
Request a sales consultant
</b>
</font>
</td>
</tr>
<tr>
<td colspan="3">
<font color="#<%=BodyFontColor
%>" size="<%=BodyFontSize%>" face="<%=BodyFontFace%>">
<input type="radio"
name="letuspick" value="letuspicknew"><%=RequestString%>
<br>
<% If DualSalesDepartments =
"True" then
%> <input type="radio"
name="letuspick" value="letuspickpre">Request a pre-owned sales
consultant
<%
End if
%>
</font>
</td>
</tr>
</table>-->
<%
'Else
%>
<!-- <td valign="top">
<font color="#<%=BodyFontColor
%>" size="<%=BodyFontSize2%>" face="<%=BodyFontFace%>">
<b>
<%=SalesPerson%>
</b>
</font>
<input type="hidden"
name="salesperson" value="<%=SalesPerson%>">
</td>
<td valign="top">
<a
href="meetsales.asp">
<img src="<%=ImagePath%>/
facewithname.gif" alt="" height="17" width="65" align="left"
hspace="0" vspace="0" border="0">
</a>
</td>-->

<%
'end if
'********************
%>

<!-- </td>
</tr>
<tr>
<td>
<font color="#<%=BodyFontColor%>"
size="<%=BodyFontSize%>" face="<%=BodyFontFace%>">
<b>
<font size="1" color="#<
%=BodyAsteriskColor%>" face="verdana">
*
</font>
Message
</b>
:
</font>
</td>
<td colspan="3" valign="top">
<textarea name="message" rows="4"
cols="50"></textarea>
</td>
</tr> -->
<tr bgcolor="#FFFFFF">
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
<font size="1" color="#<%=BodyAsteriskColor%>"
face="verdana">
*
</font>
Name
</b>
:
</font>
</td>
<td colspan="3" valign="top">
<input type="text" name="name" size="20">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
<font size="1" color="#<%=BodyAsteriskColor%>"
face="verdana">
*
</font>
Email
</b>
:
</font>
</td>
<td colspan="3" valign="top">
<input type="text" name="email" size="30">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
<font size="1" color="#<%=BodyAsteriskColor%>" face="verdana">
*
</font>
Phone (Day)
</b>
:
</font>
</td>
<td valign="top">
<input type="text" name="dayphone" size="12">
</td>
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
Phone (Evening)
</b>
:
</font>
</td>
<td valign="top">
<input type="text" name="phoneevening" size="12">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
&nbsp;&nbsp;&nbsp;Fax
</b>
:
</font>
</td>
<td valign="top">
<input type="text" name="fax" size="12">
</td>
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">&nbsp;

</font>
</td>
<td valign="top">&nbsp;

</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
&nbsp;&nbsp;&nbsp;Address
</b>
:
</font>
</td>
<td colspan="3">
<input type="text" name="address" size="25">
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
Apt
</b>
:
</font>
<input type="text" name="apt" size="4">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
&nbsp;&nbsp;&nbsp;City
</b>
:
</font>
</td>
<td colspan="3">
<input type="text" name="city" size="12">
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
State
</b>
:
</font>
<input type="text" name="state" size="12">
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
Zip Code
</b>
:
</font>
<input type="text" name="zip" size="6">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
&nbsp;&nbsp;&nbsp;Comments
</b>
:
</font>
</td>
<td colspan="3" valign="top">
<textarea name="comments" rows="4" cols="50"></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<font color="#<%=BodyFontColor%>" size="<%=BodyFontSize%>"
face="<%=BodyFontFace%>">
<b>
<font size="1" color="#<%=BodyAsteriskColor%>"
face="verdana">
*
</font>
Required Fields
</b>
</font>
</td>
<td colspan="3" valign="top">&nbsp;

</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="4">
<input type="hidden" name="StockNumber" value="<%= StockNumber %>">
<input type="hidden" name="VIN" value="<%=VIN%>">
<input type="hidden" name="target" value="contactussales">
<input type="hidden" name="mailto" value="<
%=Request.QueryString("DealerName")%>">
<%
'the EMAILTO field is TEMPORARY !!
%>
<input type="hidden" name="emailto" value="<
%'=Request.QueryString("DealerEmail")%>">
<input type="submit" name="contactus" value="Submit">
</td>
</tr>
</form>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0">
<!-- Begin Footer -->
<tr>
<td>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr><td bgcolor="#FFFFFF" colspan="5" width="770"><img src="images/
spacer.gif" width="1" height="1" hspace="0" vspace="0" border="0"
align="left"></td></tr>

<tr>

<td height="40" bgcolor="#FFFFFF" width="1"><img src="images/
spacer.gif" width="1" height="1"></td>
<td width="4" bgcolor="#FFFFFF" style="color:#96989F;font-size:
10px; font-family:Tahoma">&nbsp;
</td>
<td width="5" bgcolor="#FFFFFF" style="font-family: Tahoma; font-
size: 11px; color: 494848"><img src="../tests/spacer.gif" width="1"
height="1"></td>
<td width="758" bgcolor="#FFFFFF" style="color:#C4C2BF;font-size:
10px; font-family:Tahoma">
<div style=" padding-left:14px">
<table class="MsoNormalTable" border="0" cellspacing="0"
cellpadding="0" width="100%" style="width: 100.0%">
<tr>
<td style="padding: 0in; background: #0066CC; ; font-
family:Tahoma; font-size:11px; color:494848">
<p class="MsoNormal" align="right" style="text-align: center">
<span style="font-size:9.5pt;font-family:Arial;color:black">
<script language="JavaScript" src="/onlineopinion/
onlineopinion3t.js">
</script>
</script>
</span><font color="#745209">
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/index.asp">
<font color="#FFFFFF">Home</font></a></font><font
color="#FFFFFF"> &nbsp;|&nbsp;
</font><font color="#745209">
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/research.html">
<font color="#FFFFFF">New</font></a><font color="#FFFFFF">
&nbsp;|&nbsp;
</font>
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/index-1.asp">
<font color="#FFFFFF">Used</font></a><font color="#FFFFFF">
&nbsp;|&nbsp;
</font>
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/index-4.html">
<font color="#FFFFFF">Sell</font></a><font color="#FFFFFF">
&nbsp;|&nbsp;
</font>
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/index-5.html">
<font color="#FFFFFF">Research</font></a><font color="#FFFFFF">
&nbsp;|&nbsp;
</font>
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="index.asp">
<font color="#FFFFFF">Auto loan</font></a><font color="#FFFFFF">
&nbsp;|&nbsp;
</font>
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/warranty.html">
<font color="#FFFFFF">Warranty </font> </a><font
color="#FFFFFF">&nbsp;|&nbsp;
</font>
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/index-7.html">
<font color="#FFFFFF">News and advice</font></a><font
color="#FFFFFF"> &nbsp;|&nbsp;
</font>
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/dealers.html">
<font color="#FFFFFF">Dealers</font></a><font color="#FFFFFF">
&nbsp;|&nbsp;
</font>
<a style="text-decoration: none; font-size: 10px; font-
family:Tahoma" href="http://allnycars.com/contactussales.asp">
<font color="#FFFFFF">Contact us</font></a><font
color="#FFFFFF">&nbsp;</td>
</tr>
<tr>
<td style="height: .75pt; padding: 0in; background: #666666;
font-family:Tahoma; font-size:11px; color:494848">
<p class="MsoNormal">
<span style="font-size:
9.5pt;font-family:Arial;color:black"><![if !vml]>
<img border=0
src="usedcarsny_files/image001.gif" v:shapes="_x0000_s1130"><!
[endif]></span></td>
</tr>
</table>
&nbsp;
<script language="javascript1.2">
document.write('<');
document.write('!-- ');
</script><noscript><img border=0 hspace=0
vspace=0 width=1 height=1 src="http://mirror2.s-tracking.com/tracking/
track.php?campaignId=17072"></noscript>
<!--//-->
</div>
</td>
<td bgcolor="#FFFFFF" width="2"><img src="images/spacer.gif"
width="1" height="1"></td>
</tr>
<tr><td bgcolor="#FFFFFF" colspan="5" width="770"><img src="images/
spacer.gif" width="1" height="1"></td></tr>
</table>
</td>
</tr>
</table>
</center>

</BODY>
</HTML>
Reply all
Reply to author
Forward
0 new messages