Google Answers Logo
View Question
 
Q: Form Validation ( Answered 5 out of 5 stars,   5 Comments )
Question  
Subject: Form Validation
Category: Computers > Programming
Asked by: kraken-ga
List Price: $20.00
Posted: 21 Apr 2004 16:33 PDT
Expires: 21 May 2004 16:33 PDT
Question ID: 334036
I need a form validation script for the drop down menus but not the
radio button on this page:
http://www.discountfactoryspas.com/millenium3.htm
Answer  
Subject: Re: Form Validation
Answered By: hammer-ga on 23 Apr 2004 07:00 PDT
Rated:5 out of 5 stars
 
Kraken,

JavaScript is very sensitive to syntax errors. I fixed up your page to
take care of these. They included:
* Your form had no name.
* Your form element names had exclamation points, spaces and began
with a number. You may need to change your cgi to use the new names.
* On some browsers, using focus can prevent the correct return value
from being returned.
* I also put quotes around all your Select values, to ensure they are
passed correctly.

Your cleaned up page is pasted below. If it is too difficult to work
with in the Answer Box, it is also mounted at:
http://www.hammerdata.com/Google/millenium3.htm

For reference, there in an excellent JavaScript FAQ available at IRT.org.
http://developer.irt.org/script/script.htm

Please let me know if you need clarification.

Good luck with your website!

- Hammer

Search strategy: None

---------------------------------------

<html>
<head>
<title>Spas Hot Tubs Whirlpools and Accessories</title>
<STYLE>
BODY     {scrollbar-3dlight-color:#ffffff;
          scrollbar-arrow-color:yellow;
          scrollbar-base-color:#ffffff;
          scrollbar-darkshadow-color:#ffffff;
          scrollbar-face-color:#4a64bc;
          scrollbar-highlight-color:#000000;
          scrollbar-shadow-color:#ffffff}
</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="description" content="Discount Factory Spas helps
customers in selecting the right Portable hot tubs, and sells hot tub
supplies and accessories. Find complete hot tub and spa care tips to
relaxation and home improvement with your hot tubs and spa. Located in
Clearwater, Florida.">
<meta name="keywords" content="Hot tub, hot tub spa, portable hot tub,
spa hot tub, HydroSpa, Lucite, hot tubs, portable spa, portable spas,
portable hot tubs, hot tub, Hot Spot spa, jacuzzi">
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script language="JavaScript">
<!--
function ValidateForm()
{
	if(document.options_frm.A1050_Color.selectedIndex == 0)
	{
		alert("Please select a color.");
		return false; 
	}
	else if(document.options_frm.A1050_Cabinet.selectedIndex == 0)
	{
		alert("Please select a cabinet.");
		return false; 
	}
	else if(document.options_frm.A1050_Cover.selectedIndex == 0)
	{
		alert("Please select a cover.");
		return false; 
	}
	else
	{
		return true;
	}
}
//-->
</script>

</head>

<body bgcolor="#FFFFFF" bgproperties="fixed" text="#000000"
onLoad="MM_preloadImages('images/spas_on.gif','images/parts_on.gif','images/covers_on.gif','images/access_on.gif','images/tech_on.gif','images/faq_on.gif','images/contact_on.gif','images/home_on.gif')"
leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0"
background="images/header_bg.jpg" height="49">
  <tr> 
    <td height="217" width="19%"> <br>
      <br>
      <div align="left"><img src="images/logo.gif" width="155"></div>
    </td>
    <td height="217" valign="bottom"> 
      <div align="center"><img src="images/wfall_radio_hdr.jpg"
width="450" height="175"></div>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="239">
  <tr> 
    <td rowspan="3" height="283" valign="top" width="20%"> 
      <table width="99%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="spas.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('spas','','images/spas_on.gif',1)"><img
name="spas" border="0" src="images/spas_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="parts.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('parts','','images/parts_on.gif',1)"><img
name="parts" border="0" src="images/parts_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="covers.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('covers','','images/covers_on.gif',1)"><img
name="covers" border="0" src="images/covers_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="accessories.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('accessories','','images/access_on.gif',1)"><img
name="accessories" border="0" src="images/access_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="tech.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('tech','','images/tech_on.gif',1)"><img
name="tech" border="0" src="images/tech_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="faq.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('faq','','images/faq_on.gif',1)"><img
name="faq" border="0" src="images/faq_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="contact.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('contact','','images/contact_on.gif',1)"><img
name="contact" border="0" src="images/contact_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42" valign="top"> 
            <div align="center"> <a href="default.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image30','','images/home_on.gif',1)"><img
name="Image30" border="0" src="images/home_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
      </table>
    </td>
    <td colspan="3" height="42"> 
      <div align="center"><img src="images/millenium_title.gif"
width="250" height="43"></div>
    </td>
  </tr>
  <tr> 
    <td height="276" width="54%" valign="bottom" colspan="2"> 
      <div align="center"><img src="images/millenium_frt.jpg"
width="250" height="250"></div>
    </td>
    <td height="276" width="26%"><font face="Geneva, Arial, Helvetica,
san-serif"><b><i><font color="#4A64BC">2001H
      STANDARD</font></i></b><br>
      <br>
      <br>
      <font size="2">Avg. Fill: 550 </font><font face="Geneva, Arial,
Helvetica, san-serif" size="2">U.S.
      Gal</font><font size="2"><br>
      Approx. Wt. Full. 2720 lbs<br>
      Approx. Max. Wt. 5850 lbs<br>
      Width 94 inches<br>
      Length 94 inches<br>
      Depth 35 inches<br>
      Seating Capacity 6 </font><br>
      </font> </td>
  </tr>
  <tr> 
    <td height="64" colspan="3"> 
      <div align="center"><font face="Geneva, Arial, Helvetica,
san-serif" size="2">This
        spa represents the most diversified seating and jet configuration. Total 
        comfort was of the utmost importance when designing this luxury spa. From 
        neck jets, to pulsating jets for the bottom of your feet, the
62 Jet Millennium
        has your body covered. Two 5 HP Pumps provide maximum power </font></div>
    </td>
  </tr>
  <tr> 
    <td rowspan="2" height="124" width="20%" valign="top">
      <p align="center"><a href="warranty.htm"><img
src="images/warranty.gif" width="150" height="83" border="0"></a></p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p align="center">&nbsp;</p>
    </td>
    <td width="27%" height="62"> 
      <p align="center"><font face="Verdana, Arial, Helvetica,
sans-serif" size="5" color="#4A64BC"><b>$6499.00
        <br>
        </b></font><font face="Geneva, Arial, Helvetica, san-serif"
size="2">(includes
        delivery and cover)</font></p>
      <p align="center"><font face="Geneva, Arial, Helvetica,
san-serif" size="2"><i><b>Select
        your colors and order now</b></i></font><br>
        <br>
        <a href="#"><font face="Geneva, Arial, Helvetica, san-serif"
onClick="MM_openBrWindow('spa_colors.htm','','scrollbars=yes,width=650,height=400')"
size="2">Click
        here for Spa Color Options</font></a> 
      <p align="center"><font size="2"><a href="#"><font face="Geneva,
Arial, Helvetica, san-serif"
onClick="MM_openBrWindow('cvr_colors.htm','','scrollbars=no,width=485,height=480')">Click
        here for Spa Cover Color Options</font></a> </font> 
      <form name="options_frm"
action="https://www.trust1.com/Welcome.cgi" method="POST"
onSubmit="return ValidateForm()">
        <div align="center"> 
          <p> 
            <input type=hidden name=id value="spaspa">
            <input type=hidden value=1 name="1050">
            <select name="A1050_Color" size=1>
              <option value="Choose Color" selected>Choose Color</option>
              <option value="Eclipse Sparkle">Eclipse Sparkle</option>
              <option value="Galaxy Green">Galaxy Green</option>
              <option value="Granite">Granite</option>
              <option value="Lunar">Lunar</option>
              <option value="Moonscape">Moonscape</option>
              <option value="Mystic Emerald">Mystic Emerald</option>
              <option value="Navy">Navy</option>
              <option value="Odyssey Sparkle">Odyssey Sparkle</option>
              <option value="Onyx">Onyx</option>
              <option value="Seaspray Green">Seaspray Green</option>
              <option value="Sierra">Sierra</option>
              <option value="Starry Night">Starry Night</option>
              <option value="Sterling Silver">Sterling Silver</option>
              <option value="Summer Sapphire">Summer Sapphire</option>
              <option value="Caribbean Granite">Caribbean Granite</option>
            </select>
            &nbsp;&nbsp;</p>
          <p> 
            <select name="A1050_Cabinet" size=1>
              <option value="Choose Color" selected>Choose Cabinet Color</option>
              <option value="Gray">Gray</option>
              <option value="Rdwood">Redwood</option>
            </select>
          </p>
          <p>
            <select name="A1050_Cover" size=1>
              <option value="Choose Color" selected>Choose Cover Color</option>
              <option value="Gray">Gray - No Charge</option>
              <option value="Brown">Brown - No Charge</option>
              <option value="Premium">Premium Colors</option>
              <option value="Black_99.00">Black $99.00 Extra</option>
              <option value="Burgundy_99.00">Burgundy $99.00 Extra</option>
              <option value="Charcoal_99.00">Charcoal $99.00 Extra</option>
              <option value="Hunter_99.00">Hunter $99.00 Extra</option>
              <option value="Lt Blue_99.00">Light Blue $99.00 Extra</option>
              <option value="Lt Gray_99.00">Light Gray $99.00 Extra</option>
              <option value="Navy_99.00">Navy $99.00 Extra</option>
              <option value="Old Teak_99.00">Old Teak $99.00 Extra</option>
              <option value="Prestige Teak_99.00">Prestige Teak $99.00
Extra</option>
              <option value="Sand_99.00">Sand $99.00 Extra</option>
              <option value="Teal_99.00">Teal $99.00 Extra</option>
              <option value="White_99.00">White $99.00 Extra</option>
            </select>
          </p>
          <p><input type="checkbox" name="A1050_Stereo" value="Stereo_500.00">
            <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Add a 
            AM/FM CD JBL Marine Stereo with pop-up speakers for only $500 </font> 
          </p>
          <p> 
            <input type="SUBMIT" NAME="SUBMIT" value="Buy Now">
          </p>
          <p>&nbsp;</p>
        </div>
      </form>
    </td>
    <td width="27%" height="62"> 
      <blockquote> 
        <div align="center"><font face="Geneva, Arial, Helvetica,
san-serif" color="4a64bc"><b>Spa
          Cabinet available in Gray or Redwood finish</b></font></div>
      </blockquote>
      <div align="center"> 
        <p><img src="images/cab_gray.jpg" width="104" height="80"></p>
        <br>
        <p><img src="images/cab_red.jpg"></p>
      </div>
    </td>
    <td height="17" width="26%"> 
      <blockquote> 
        <p><font face="Geneva, Arial, Helvetica, san-serif"
size="2"><b>No Assembly
          Required. Factory Tested. Requires 220v Direct Wiring.</b></font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Spa comes 
          with R-15 Dura-Therm Cover. Four inches thick at center, 2&quot; at 
          side. Reinforced with Galvanized steel, two locking straps, 2&quot; 
          skirt, Marine Vinyl Fabric. Available in Gray or Brown.</font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For premium 
          colors, add $99</font></p>
      </blockquote>
    </td>
  </tr>
  <tr> 
    <td height="222" colspan="3"> 
      <blockquote> 
        <table width="70%" border="0" align="center">
          <tr> 
            <td colspan="2"> 
              <blockquote> 
                <blockquote> 
                  <blockquote> 
                    <blockquote> 
                      <p><b><font face="Geneva, Arial, Helvetica,
san-serif" color="#4A64BC">STANDARD
                        FEATURES </font></b></p>
                    </blockquote>
                  </blockquote>
                </blockquote>
              </blockquote>
            </td>
          </tr>
          <tr> 
            <td width="50%"> 
              <div align="left"> 
                <ul>
                  <li><font face="Geneva, Arial, Helvetica,
san-serif"><font size="2">5.5
                    KW Heater/220 V </font></font></li>
                  <li><font face="Geneva, Arial, Helvetica,
san-serif"><font size="2">Deluxe
                    Redwood Cabinet</font></font><font face="Geneva,
Arial, Helvetica, san-serif" size="2"><br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">2 
                    High Flow 56 Frame Pumps<br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">24 
                    Hour Crystal-Clear Filtration <br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2"><a href="#"
onClick="MM_openBrWindow('balboa1.htm','','scrollbars=yes,width=400,height=400')">Sure
                    Touch Electronic Controls</a> <br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">110V
                    Air Blower<br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">52 
                    Jets / 10 Air Jets <br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Contoured
                    Neck &amp; Shoulder Jets Waterfall<br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Ultra-Pure
                    Ozone System</font></li>
                </ul>
              </div>
            </td>
            <td width="50%"> 
              <ul>
                <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">Mood 
                  Lighting<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Vibrating
                  Foot Pads<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Whirlpool
                  Jet <br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Extra
                  Wide Lounge <br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Deluxe
                  Hard Cover<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Deluxe
                  Filtrations/Sanitation System, Removable Pillows<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">Grab 
                  Rail<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Freeze
                  Protection<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">Foam 
                  Bubble Insulation<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">18 
                  Acrylic Choices</font> </li>
              </ul>
            </td>
          </tr>
        </table>
        <p align="left">&nbsp;</p>
      </blockquote>
      </td>
  </tr>
  <tr> 
    <td width="20%" height="28">&nbsp;</td>
    <td width="54%" height="44" colspan="2"> </td>
    <td width="26%" height="28">&nbsp;</td>
  </tr>
</table>
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="3">
      <div align="center"><font face="Verdana, Arial, Helvetica,
sans-serif" color="#4A64BC"><b>4733
        122nd Ave North - Clearwater, Florida 33762 - (727)
595-6705</b></font></div>
    </td>
  </tr>
</table>
</body>
</html>

Request for Answer Clarification by kraken-ga on 23 Apr 2004 14:44 PDT
The validation now works, but the shopping cart is screwed up.  The
exclamation points were required to pass the option information
correctly to the cart, which it doesn't do now. This answer won't work
for me.
Thanks

Clarification of Answer by hammer-ga on 23 Apr 2004 15:08 PDT
Okay. Here is a version that uses square bracket syntax to manage the
illegal characters. It is also mounted at:
http://www.hammerdata.com/Google/millenium3.htm

Be aware that using these illegal characters is asking for trouble.
You are much better off, if possible, fixing your shopping cart cgi.

- Hammer

-----------------------------------------------
<html>
<head>
<title>Spas Hot Tubs Whirlpools and Accessories</title>
<STYLE>
BODY     {scrollbar-3dlight-color:#ffffff;
          scrollbar-arrow-color:yellow;
          scrollbar-base-color:#ffffff;
          scrollbar-darkshadow-color:#ffffff;
          scrollbar-face-color:#4a64bc;
          scrollbar-highlight-color:#000000;
          scrollbar-shadow-color:#ffffff}
</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="description" content="Discount Factory Spas helps
customers in selecting the right Portable hot tubs, and sells hot tub
supplies and accessories. Find complete hot tub and spa care tips to
relaxation and home improvement with your hot tubs and spa. Located in
Clearwater, Florida.">
<meta name="keywords" content="Hot tub, hot tub spa, portable hot tub,
spa hot tub, HydroSpa, Lucite, hot tubs, portable spa, portable spas,
portable hot tubs, hot tub, Hot Spot spa, jacuzzi">
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script language="JavaScript">
<!--
function ValidateForm()
{
	if(document.options_frm['!1050 Color'].selectedIndex == 0)
	{
		alert("Please select a color.");
		return false; 
	}
	else if(document.options_frm['!1050 Cabinet'].selectedIndex == 0)
	{
		alert("Please select a cabinet.");
		return false; 
	}
	else if(document.options_frm['!1050 Cover'].selectedIndex == 0)
	{
		alert("Please select a cover.");
		return false; 
	}
	else
	{
		return true;
	}
}
//-->
</script>

</head>

<body bgcolor="#FFFFFF" bgproperties="fixed" text="#000000"
onLoad="MM_preloadImages('images/spas_on.gif','images/parts_on.gif','images/covers_on.gif','images/access_on.gif','images/tech_on.gif','images/faq_on.gif','images/contact_on.gif','images/home_on.gif')"
leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0"
background="images/header_bg.jpg" height="49">
  <tr> 
    <td height="217" width="19%"> <br>
      <br>
      <div align="left"><img src="images/logo.gif" width="155"></div>
    </td>
    <td height="217" valign="bottom"> 
      <div align="center"><img src="images/wfall_radio_hdr.jpg"
width="450" height="175"></div>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="239">
  <tr> 
    <td rowspan="3" height="283" valign="top" width="20%"> 
      <table width="99%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="spas.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('spas','','images/spas_on.gif',1)"><img
name="spas" border="0" src="images/spas_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="parts.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('parts','','images/parts_on.gif',1)"><img
name="parts" border="0" src="images/parts_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="covers.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('covers','','images/covers_on.gif',1)"><img
name="covers" border="0" src="images/covers_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="accessories.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('accessories','','images/access_on.gif',1)"><img
name="accessories" border="0" src="images/access_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="tech.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('tech','','images/tech_on.gif',1)"><img
name="tech" border="0" src="images/tech_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="faq.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('faq','','images/faq_on.gif',1)"><img
name="faq" border="0" src="images/faq_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42"> 
            <div align="center"><a href="contact.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('contact','','images/contact_on.gif',1)"><img
name="contact" border="0" src="images/contact_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
        <tr> 
          <td width="14%" height="42" valign="top"> 
            <div align="center"> <a href="default.htm"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image30','','images/home_on.gif',1)"><img
name="Image30" border="0" src="images/home_off.gif" width="110"
height="40"></a></div>
          </td>
        </tr>
      </table>
    </td>
    <td colspan="3" height="42"> 
      <div align="center"><img src="images/millenium_title.gif"
width="250" height="43"></div>
    </td>
  </tr>
  <tr> 
    <td height="276" width="54%" valign="bottom" colspan="2"> 
      <div align="center"><img src="images/millenium_frt.jpg"
width="250" height="250"></div>
    </td>
    <td height="276" width="26%"><font face="Geneva, Arial, Helvetica,
san-serif"><b><i><font color="#4A64BC">2001H
      STANDARD</font></i></b><br>
      <br>
      <br>
      <font size="2">Avg. Fill: 550 </font><font face="Geneva, Arial,
Helvetica, san-serif" size="2">U.S.
      Gal</font><font size="2"><br>
      Approx. Wt. Full. 2720 lbs<br>
      Approx. Max. Wt. 5850 lbs<br>
      Width 94 inches<br>
      Length 94 inches<br>
      Depth 35 inches<br>
      Seating Capacity 6 </font><br>
      </font> </td>
  </tr>
  <tr> 
    <td height="64" colspan="3"> 
      <div align="center"><font face="Geneva, Arial, Helvetica,
san-serif" size="2">This
        spa represents the most diversified seating and jet configuration. Total 
        comfort was of the utmost importance when designing this luxury spa. From 
        neck jets, to pulsating jets for the bottom of your feet, the
62 Jet Millennium
        has your body covered. Two 5 HP Pumps provide maximum power </font></div>
    </td>
  </tr>
  <tr> 
    <td rowspan="2" height="124" width="20%" valign="top">
      <p align="center"><a href="warranty.htm"><img
src="images/warranty.gif" width="150" height="83" border="0"></a></p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p align="center">&nbsp;</p>
    </td>
    <td width="27%" height="62"> 
      <p align="center"><font face="Verdana, Arial, Helvetica,
sans-serif" size="5" color="#4A64BC"><b>$6499.00
        <br>
        </b></font><font face="Geneva, Arial, Helvetica, san-serif"
size="2">(includes
        delivery and cover)</font></p>
      <p align="center"><font face="Geneva, Arial, Helvetica,
san-serif" size="2"><i><b>Select
        your colors and order now</b></i></font><br>
        <br>
        <a href="#"><font face="Geneva, Arial, Helvetica, san-serif"
onClick="MM_openBrWindow('spa_colors.htm','','scrollbars=yes,width=650,height=400')"
size="2">Click
        here for Spa Color Options</font></a> 
      <p align="center"><font size="2"><a href="#"><font face="Geneva,
Arial, Helvetica, san-serif"
onClick="MM_openBrWindow('cvr_colors.htm','','scrollbars=no,width=485,height=480')">Click
        here for Spa Cover Color Options</font></a> </font> 
      <form name="options_frm"
action="https://www.trust1.com/Welcome.cgi" method="POST"
onSubmit="return ValidateForm()">
        <div align="center"> 
          <p> 
            <input type=hidden name=id value="spaspa">
            <input type=hidden value=1 name="1050">
            <select name="!1050 Color" size=1>
              <option value="Choose Color" selected>Choose Color</option>
              <option value="Eclipse Sparkle">Eclipse Sparkle</option>
              <option value="Galaxy Green">Galaxy Green</option>
              <option value="Granite">Granite</option>
              <option value="Lunar">Lunar</option>
              <option value="Moonscape">Moonscape</option>
              <option value="Mystic Emerald">Mystic Emerald</option>
              <option value="Navy">Navy</option>
              <option value="Odyssey Sparkle">Odyssey Sparkle</option>
              <option value="Onyx">Onyx</option>
              <option value="Seaspray Green">Seaspray Green</option>
              <option value="Sierra">Sierra</option>
              <option value="Starry Night">Starry Night</option>
              <option value="Sterling Silver">Sterling Silver</option>
              <option value="Summer Sapphire">Summer Sapphire</option>
              <option value="Caribbean Granite">Caribbean Granite</option>
            </select>
            &nbsp;&nbsp;</p>
          <p> 
            <select name="!1050 Cabinet" size=1>
              <option value="Choose Color" selected>Choose Cabinet Color</option>
              <option value="Gray">Gray</option>
              <option value="Rdwood">Redwood</option>
            </select>
          </p>
          <p>
            <select name="!1050 Cover" size=1>
              <option value="Choose Color" selected>Choose Cover Color</option>
              <option value="Gray">Gray - No Charge</option>
              <option value="Brown">Brown - No Charge</option>
              <option value="Premium">Premium Colors</option>
              <option value="Black_99.00">Black $99.00 Extra</option>
              <option value="Burgundy_99.00">Burgundy $99.00 Extra</option>
              <option value="Charcoal_99.00">Charcoal $99.00 Extra</option>
              <option value="Hunter_99.00">Hunter $99.00 Extra</option>
              <option value="Lt Blue_99.00">Light Blue $99.00 Extra</option>
              <option value="Lt Gray_99.00">Light Gray $99.00 Extra</option>
              <option value="Navy_99.00">Navy $99.00 Extra</option>
              <option value="Old Teak_99.00">Old Teak $99.00 Extra</option>
              <option value="Prestige Teak_99.00">Prestige Teak $99.00
Extra</option>
              <option value="Sand_99.00">Sand $99.00 Extra</option>
              <option value="Teal_99.00">Teal $99.00 Extra</option>
              <option value="White_99.00">White $99.00 Extra</option>
            </select>
          </p>
          <p><input type="checkbox" name="!1050 Stereo" value="Stereo_500.00">
            <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Add a 
            AM/FM CD JBL Marine Stereo with pop-up speakers for only $500 </font> 
          </p>
          <p> 
            <input type="SUBMIT" NAME="SUBMIT" value="Buy Now">
          </p>
          <p>&nbsp;</p>
        </div>
      </form>
    </td>
    <td width="27%" height="62"> 
      <blockquote> 
        <div align="center"><font face="Geneva, Arial, Helvetica,
san-serif" color="4a64bc"><b>Spa
          Cabinet available in Gray or Redwood finish</b></font></div>
      </blockquote>
      <div align="center"> 
        <p><img src="images/cab_gray.jpg" width="104" height="80"></p>
        <br>
        <p><img src="images/cab_red.jpg"></p>
      </div>
    </td>
    <td height="17" width="26%"> 
      <blockquote> 
        <p><font face="Geneva, Arial, Helvetica, san-serif"
size="2"><b>No Assembly
          Required. Factory Tested. Requires 220v Direct Wiring.</b></font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Spa comes 
          with R-15 Dura-Therm Cover. Four inches thick at center, 2&quot; at 
          side. Reinforced with Galvanized steel, two locking straps, 2&quot; 
          skirt, Marine Vinyl Fabric. Available in Gray or Brown.</font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For premium 
          colors, add $99</font></p>
      </blockquote>
    </td>
  </tr>
  <tr> 
    <td height="222" colspan="3"> 
      <blockquote> 
        <table width="70%" border="0" align="center">
          <tr> 
            <td colspan="2"> 
              <blockquote> 
                <blockquote> 
                  <blockquote> 
                    <blockquote> 
                      <p><b><font face="Geneva, Arial, Helvetica,
san-serif" color="#4A64BC">STANDARD
                        FEATURES </font></b></p>
                    </blockquote>
                  </blockquote>
                </blockquote>
              </blockquote>
            </td>
          </tr>
          <tr> 
            <td width="50%"> 
              <div align="left"> 
                <ul>
                  <li><font face="Geneva, Arial, Helvetica,
san-serif"><font size="2">5.5
                    KW Heater/220 V </font></font></li>
                  <li><font face="Geneva, Arial, Helvetica,
san-serif"><font size="2">Deluxe
                    Redwood Cabinet</font></font><font face="Geneva,
Arial, Helvetica, san-serif" size="2"><br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">2 
                    High Flow 56 Frame Pumps<br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">24 
                    Hour Crystal-Clear Filtration <br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2"><a href="#"
onClick="MM_openBrWindow('balboa1.htm','','scrollbars=yes,width=400,height=400')">Sure
                    Touch Electronic Controls</a> <br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">110V
                    Air Blower<br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">52 
                    Jets / 10 Air Jets <br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Contoured
                    Neck &amp; Shoulder Jets Waterfall<br>
                    </font></li>
                  <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Ultra-Pure
                    Ozone System</font></li>
                </ul>
              </div>
            </td>
            <td width="50%"> 
              <ul>
                <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">Mood 
                  Lighting<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Vibrating
                  Foot Pads<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Whirlpool
                  Jet <br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Extra
                  Wide Lounge <br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Deluxe
                  Hard Cover<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Deluxe
                  Filtrations/Sanitation System, Removable Pillows<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">Grab 
                  Rail<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif"
size="2">Freeze
                  Protection<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">Foam 
                  Bubble Insulation<br>
                  </font></li>
                <li><font face="Geneva, Arial, Helvetica, san-serif" size="2">18 
                  Acrylic Choices</font> </li>
              </ul>
            </td>
          </tr>
        </table>
        <p align="left">&nbsp;</p>
      </blockquote>
      </td>
  </tr>
  <tr> 
    <td width="20%" height="28">&nbsp;</td>
    <td width="54%" height="44" colspan="2"> </td>
    <td width="26%" height="28">&nbsp;</td>
  </tr>
</table>
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="3">
      <div align="center"><font face="Verdana, Arial, Helvetica,
sans-serif" color="#4A64BC"><b>4733
        122nd Ave North - Clearwater, Florida 33762 - (727)
595-6705</b></font></div>
    </td>
  </tr>
</table>
</body>
</html>

Request for Answer Clarification by kraken-ga on 23 Apr 2004 16:13 PDT
May I ask what kind of trouble?

The shopping cart is run througha third at the moment so I'm kind of
stuck, but I don't make a big mess either.

Thanks for the detailed answers.

Clarification of Answer by hammer-ga on 24 Apr 2004 05:25 PDT
Special characters like exclamation points and spaces mean things to
computers and many software packages. For example, the exclamation
point or bang is often used by database products as a separator.
Spaces also create trouble, especially in names. If you have something
called Last and something called Name and something called Last Name,
the computer can have trouble determining if Last Name means Last Name
or if it means Last and Name.

You may find yourself having to work around this in other areas, as we
had to use a special syntax to get JavaScript to accept the form
element name.

- Hammer
kraken-ga rated this answer:5 out of 5 stars and gave an additional tip of: $5.00
Very detailed and thorough - clarifications were exact
Thanks!

Comments  
Subject: Re: Form Validation
From: kapilk-ga on 21 Apr 2004 17:06 PDT
 
You will need to use javascript for the form validation of drop-downs.
Here is a code example
Assuming this is the drop-down for which you wish to add validation

<form name='frm' action='xyz.htm' onSubmit="return validateForm()">
<select name='lst'>
  <option value='A'>Product A</option>
</select>
</form>
*Note: make sure the drop-down is enclosed in a <form> tag.

To validate this drop-down, add the following javascript code
<script language="JavaScript">
<!--
with(document.frm)
{
 function ValidateForm
 {
   if(lst.selectedIndex == 0)
   {
    alert("Please select a value.");
    lst.focus();
    return false; 
   }
 }
}
</script>

This code will add the drop-down validation on your page.

HTH

kapilk-ga
Subject: Re: Form Validation
From: kraken-ga on 21 Apr 2004 18:34 PDT
 
Can't get it to work - I have multiple drop down lists in the form. 
Could this be the problem?  Haven't had any success with any script to
validate this form yet.  Validating text areas seems to be simple, but
the other form objects don't seem to respond.

Thx
Subject: Re: Form Validation
From: kapilk-ga on 22 Apr 2004 16:34 PDT
 
Does it work for any one drop-down? Make sure you are replacing lst
with the correct drop-down name.
What is the error?
Subject: Re: Form Validation
From: kraken-ga on 23 Apr 2004 02:24 PDT
 
Wouldn't work for single menu either.  I made appropriate changes.  No
error message - but continues to shopping cart without options being
chosen.  Which is what I'm trying go prevent.
Subject: Re: Form Validation
From: kraken-ga on 23 Apr 2004 04:57 PDT
 
The link in the original question is a page that I tried to use your
script with.  It only attempts to validate the first drop down.  Feel
free to take a look and see if I may have made a mistake in adding the
script.
Thanks

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy