-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 21, 2004 12:07 PM
To: [EMAIL PROTECTED]
Subject: RE: Witango-Talk: Searching (OT)

>>>
I have been putzing with this and got it to work, cross platform. Not 
done yet, but it works so far. Any suggestion are welcome...
<<<

The only think I would have done different is to use the case statement for efficiency 
and organization [see below].

Mike

================================================================================
<html><body>
<FORM METHOD="POST" ACTION="<@APPFILE>?function=test name=form1>

Select Location
<select name="AddressID" size=1 
onChange="FillInAddress(document.form1.AddressID.selectedIndex)">
<option value="0">Select One</option>
<option value="906">Eagandale</option>
<option value="6640">Eagandale Tech Center</option>
<option value="902">Main Building</option>
<option value="903">River Park</option>
<option value="904">River Park II</option>
<option value="905">Waterview</option>

</select>
Address</FONT> <br>
<input type="text" name="comp_addr1" value="" size="35" maxlength="35"><br>
<input type="text" name="comp_addr2" value="" size="35" maxlength="35">

City<br>
        
<input type="text" name="comp_city" value="" size="35" maxlength="35">

State<br>
        
<input type="text" name="comp_state" value="" size="35" maxlength="35">

Zip<br>
        
<input type="text" name="comp_zip" value="" size="10" maxlength="10">

<INPUT TYPE=SUBMIT VALUE="Next">

<input type=hidden name=OrderID value="">
<input type=hidden name=xmlproductID value="599">
<input type=hidden name=productID value="599">
<input type="hidden" name="title3" value="">
<input type="hidden" name="comp_name1" value="">
<input type="hidden" name="comp_name2" value="">
<input type="hidden" name="comp_name3" value="">
<input type="hidden" name="comp_addr3" value="">

</form>
       
</body>
</HTML>
<SCRIPT LANGUAGE="JavaScript">

<!--
var f = document.form1

function FillInAddress(str1) 
        {
        switch(str1)
        {
                case '0':
                {
                        f.comp_name1.value = "";
                        f.comp_name2.value = "";
                        f.comp_name3.value = "";
                        f.comp_addr1.value = "";
                        f.comp_addr2.value = "";
                        f.comp_addr3.value = "";
                        f.comp_city.value = "";
                        f.comp_state.value = "";
                        f.comp_zip.value = "";
                        f.phone.value = "";
                        f.fax.value = "";
                        break;
                }
                case '1':
                {
                        f.comp_name1.value = "";
                        f.comp_name2.value = "";
                        f.comp_name3.value = "";
                        f.comp_addr1.value = "1305 Corporate Center Drive";
                        f.comp_addr2.value = "";
                        f.comp_addr3.value = "";
                        f.comp_city.value = "New York";
                        f.comp_state.value = "MN";
                        f.comp_zip.value = "55555-1204";
                        break;
                }
                case '2':
                {
                        f.comp_name1.value = "";
                        f.comp_name2.value = "";
                        f.comp_name3.value = "";
                        f.comp_addr1.value = "1303 Corporate Center Drive";
                        f.comp_addr2.value = "";
                        f.comp_addr3.value = "";
                        f.comp_city.value = "Chicago";
                        f.comp_state.value = "MN";
                        f.comp_zip.value = "66666-1204";
                        break;
                }
                case '3':
                {
                        f.comp_name1.value = "";
                        f.comp_name2.value = "";
                        f.comp_name3.value = "";
                        f.comp_addr1.value = "3535 Blue Cross Road";
                        f.comp_addr2.value = "";
                        f.comp_addr3.value = "";
                        f.comp_city.value = "Minneapolis";
                        f.comp_state.value = "MN";
                        f.comp_zip.value = "77777-1154";
                        break;
                }
                case '4':
                {
                        f.comp_name1.value = "";
                        f.comp_name2.value = "";
                        f.comp_name3.value = "";
                        f.comp_addr1.value = "3400 Yankee Drive";
                        f.comp_addr2.value = "";
                        f.comp_addr3.value = "";
                        f.comp_city.value = "Los Angeles";
                        f.comp_state.value = "MN";
                        f.comp_zip.value = "88888-1627";
                        break;
                }
                case '5':
                {
                        f.comp_name1.value = "";
                        f.comp_name2.value = "";
                        f.comp_name3.value = "";
                        f.comp_addr1.value = "1800 Yankee Doodle Road";
                        f.comp_addr2.value = "";
                        f.comp_addr3.value = "";
                        f.comp_city.value = "San Fra";
                        f.comp_state.value = "MN";
                        f.comp_zip.value = "99999-1644";
                        break;
                }
                case '6':
                {
                        f.comp_name1.value = "";
                        f.comp_name2.value = "";
                        f.comp_name3.value = "";
                        f.comp_addr1.value = "1200 Yankee Doodle Road";
                        f.comp_addr2.value = "";
                        f.comp_addr3.value = "";
                        f.comp_city.value = "Detroit";
                        f.comp_state.value = "MN";
                        f.comp_zip.value = "22222-2202";
                        break;
                }
        }
}

//-->


</SCRIPT>
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to