View Single Post
  #1 (permalink)  
Old January 18th, 2006, 08:20 PM
tennisdad1 tennisdad1 is offline
Registered User
 
Join Date: Jan 2006
Location: Plainsboro, NJ, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default alternate method of using MapQuest

I am having a time trying to find a solution to my problem. Trying to create a form that allows user to enter a "From" location and selecting one of 4 different "To" locations. Mapquest basic code requires that the form fields id's start with either 1 or a 2, so I cannot create Javascript to populate the hidden fields based on a radio button (id values must start with alphabet). Another option would be to build the info into a string and then submit to MapQuest (needs to be a new window), but I have yet been able to uncover a method to accomplish this task without the form submitting the field names and ignoring my string.

Here is the link to MapQuest on how to link:
http://www.mapquest.com/features/main.adp?page=lf_dir

txtFromLoc = txtFromLoc+"&1a="+fromAddr+"&1c="+fromCity+"&1s="+ document.frmDir.txtState.value+"&1z="+document.frm Dir.txtZip.value+"&1y=US"+txtToLoc;

document.frmDir.action= txtFromLoc;

.....
<form onSubmit="return runMapQuest();" target="_blank" name="frmDir" >
<input type="hidden" name="go" value="1">
<div align="left">

Any thoughts?

Reply With Quote