|
Ok, now I feel incredibly stupid. I received a PM from another forum member telling me that I wasn't posting my code correctly and that I needed to put it in complete <HTML> to </HTML> format if I wanted help.
I didn't want to include a lot of non-related stuff so I made a small page and enclosed just the code I had posted with the proper leading and trailing tags and suddenly it worked like it was supposed to, and obviously so did the code solution you gave me.
Anyway I narrowed it down to the code where my problem started occuring and that is what I included below. I don't have it on the web since it isn't working correctly.
I apologize if I've taken up your time with the wrong problem but I would really appreciate your help on why it isn't working. I downloaded 1st Page to see if it would help me instead of typing the raw html into a text file like I've been doing up to this point. When I preview the code below in 1st Pages panel it gives me an error message that says: 'office.selectedIndex is null or not an object...do you want to continue running scripts on this page'. Then whether I hit the OK or Cancel button it doesn't fill in the text fields with the multi-values.
<html>
<head>
<title>Directions</title>
</head>
<body>
<P><div>
<tableborder="0"width="550"PrintLinkText="Show a print version"PrintOption="noPrint"TlxClass="table_template"bordercolor="#000000"cellpadding="2"cellspacing="0"class="table_d2e50 usertable main_table"><tr><tdclass="user main">
<div><P align=center><FONT face=tahoma,verdana,sans-serif><FONT size=4><FONT size=2>2801 Youngfield Street<BR> Golden, CO 80401</FONT></FONT></FONT></p><P align=center>
<form action="http://maps.msn.com/home.aspx" method="get" style="margin-top:0; margin-bottom:0" target="_blank"><input name="strt1" type="hidden" value="2801 Youngfield St "><input name="city1" type="hidden" value="Golden "><input name="stnm1" type="hidden" value="CO "><input name="zipc1" type="hidden" value="80401"><input border="0" src="/addon/maps/white_view_map.gif" type="image"></form></P>
</div>
</td><tdclass="user main">
<div><P align=center><FONT face=Tahoma size=2>12001 W. 63rd. Place<BR>Arvada, CO 80004</FONT></FONT></p><P align=center><!--"''"-->
<form action="http://maps.msn.com/home.aspx" method="get" style="margin-top:0; margin-bottom:0" target="_blank"><input name="strt1" type="hidden" value="12001 63rd Pl "><input name="city1" type="hidden" value="Arvada "><input name="stnm1" type="hidden" value="CO "><input name="zipc1" type="hidden" value="80004"><input border="0" src="/addon/maps/white_view_map.gif" type="image"></form></P>
</div>
</td><tdclass="user main">
<div><P align=center><FONT face=Tahoma size=2>808 S. Public Road<BR>Lafayette, CO 80026-2194</FONT></p><P align=center>
<form action="http://maps.msn.com/home.aspx" method="get" style="margin-top:0; margin-bottom:0" target="_blank"><input name="strt1" type="hidden" value="808 S Public Rd "><input name="city1" type="hidden" value="Lafayette "><input name="stnm1" type="hidden" value="CO "><input name="zipc1" type="hidden" value="80026"><input border="0" src="/addon/maps/white_view_map.gif" type="image"></form></P>
</div>
</td><tdclass="user main"> </td></tr></table>
<!--/table tableId="table_d2e50"-->
</p>
</td></tr></table>
<!--/table tableId="table_d2e16"-->
</p>
<p><div>
<tableborder="0"cellpadding="0"cellspacing="0"><tr><TDALIGN="center"COLSPAN="3"><script type="text/javascript"><!--
function onsel(){var form = document.forms[0];
if(form.office.selectedIndex==0){ // Don't display anything if first option is selected
form.strt2.value =""; form.city2.value =""; form.stnm2.value =""; form.zipc2.value ="";
return;
}
form.strt2.value = form.office.options[form.office.selectedIndex].value.split("|")[0];
form.city2.value = form.office.options[form.office.selectedIndex].value.split("|")[1];
form.stnm2.value = form.office.options[form.office.selectedIndex].value.split("|")[2];
form.zipc2.value = form.office.options[form.office.selectedIndex].value.split("|")[3];
}
//--></script>
<form action="http://maps.msn.com/directionsFind.aspx" method="get" style="margin-bottom:0" target="_blank">
<select onclick="onsel()" name="office">
<option>Choose Office Location...</option>
<option value="2801 Youngfield St |Golden |CO |80401">Golden</option>
<option value="12001 63rd Pl |Arvada |CO |80004">Arvada</option>
<option value="808 S Public Rd |Lafayette |CO |80026">Lafayette</option>
</select><br />
<input type="text" name="strt2" value="" /><br />
<input type="text" name="city2" value="" /><br />
<input type="text" name="stnm2" value="" /><br />
<input type="text" name="zipc2" value="" /><br />
<tableborder="0"cellpadding="0"cellspacing="0"><TR><TDALIGN="center"COLSPAN="3"><tableborder="0"width="550"><TR><TDALIGN="left"COLSPAN="2"><span style="font-weight:bold;font-size:13px;">Enter your starting address:</span></TD></TR><TR><TDALIGN="right"><span style="font-size:13px;">Street Address: </span></TD><TD><INPUT NAME="strt1" SIZE="30" TYPE="text"></TD></TR><TR><TDALIGN="right"><span style="font-size:13px;">City: </span></TD><TD><INPUT NAME="city1" SIZE="30" TYPE="text"></TD></TR><TR><TDALIGN="right"><span style="font-size:13px;">State: </span></TD><TD><INPUT NAME="stnm1" SIZE="30" TYPE="text"></TD></TR><TR><TDALIGN="right"><span style="font-size:13px;">ZIP Code: </span></TD><TD><INPUT NAME="zipc1" SIZE="30" TYPE="text"></TD></TR></table></TD></TR><TR><TDALIGN="center"COLSPAN="3"><input border="0" src="/addon/maps/white_plan_route.gif" type="image">
</td></tr></table>
</form>
</TD></TR></table>
<!--end gem--><!--"''"-->
</div>
</p>
</body>
</html>
|