%26lt;HTML%26gt;
%26lt;form name="gmaps" action="http://maps.google.com/" method="GET"%26gt;
zip code: %26lt;input type="text" name="q" /%26gt;
%26lt;input type="submit" value ="Go to Maps" /%26gt;
%26lt;/form%26gt;
%26lt;/HTML%26gt;
is a simple form which will search for a given ZIP code (or any query, for that matter) on google maps. It simply passes a text input to a google maps search.
other input types include "checkbox" "radio" and "password".
Dropdown boxes are made using the "select" input type. (see example in sources)Can any one tell me how to make a drop down box work on a html document?
Simple Drop Drop Down Box;
%26lt;html%26gt;
%26lt;body%26gt;
%26lt;form action=""%26gt;
%26lt;select name="Selection"%26gt;
%26lt;option value="opt1"%26gt;Option 1%26lt;/option%26gt;
%26lt;option value="opt2"%26gt;Option 2%26lt;/option%26gt;
%26lt;option value="opt3"%26gt;Option 3%26lt;/option%26gt;
%26lt;option value="opt4"%26gt;Option 4%26lt;/option%26gt;
%26lt;/select%26gt;
%26lt;/form%26gt;
%26lt;/body%26gt;
%26lt;/html%26gt;
Now if you want to use these boxes as input variables you need a form with the options.
%26lt;html%26gt;
%26lt;body%26gt;
%26lt;form name="input" action="html_form_action.asp" method="get"%26gt;
%26lt;select name="Selection"%26gt;
%26lt;option value="opt1"%26gt;Option 1%26lt;/option%26gt;
%26lt;option value="opt2"%26gt;Option 2%26lt;/option%26gt;
%26lt;option value="opt3"%26gt;Option 3%26lt;/option%26gt;
%26lt;option value="opt4"%26gt;Option 4%26lt;/option%26gt;
%26lt;/select%26gt;
%26lt;select name="Selection"%26gt;
%26lt;option value="opt1"%26gt;Option 1%26lt;/option%26gt;
%26lt;option value="opt2"%26gt;Option 2%26lt;/option%26gt;
%26lt;option value="opt3"%26gt;Option 3%26lt;/option%26gt;
%26lt;option value="opt4"%26gt;Option 4%26lt;/option%26gt;
%26lt;/select%26gt;
%26lt;input type="submit" value="Submit" /%26gt;
%26lt;/form%26gt;
%26lt;/body%26gt;
%26lt;/html%26gt;
Now the hard part is transfering that data to usable information. If you look where the "Action=" string is this is waht happens to your data right now it reffers to a random .asp form used for an example i only use these tools to form level so i have no idea how to take this info and paste it into a custom google map search however if you look at googles business tools they have already created an app for this, just pop that on your webpage and it should suit your needs, if not this bit of HTML code should point you in the right direction.
Google App:
http://googlemapsapi.blogspot.com/2007/0鈥?/a>
Good luck
Ash x
:edit:
the guy above me is spot on !!!, vote him as best answer
No comments:
Post a Comment