views:

162

answers:

2

Hi, I'm not an expert but i know a little about HTML forms, here is my problem

i want to create a simple html page with form for my customers to enter a gps values to maps.google.com and get back the result page embedded in the same html

here is the exact format of my string

as an example : 32 06 12.66N, 20 12 22.65E notes that there is spaces between values

that should be post to ( maps.google.com/?q=32 06 12.66N, 20 12 22.65E ) and take the result page and embed it back in the same html page

i want to create a from with separated input fields for every value (drop down menu for the "N" "W" and "S" "E")

would you plz tell me what is exactly the html code for that , appreciate any help guys

A: 

You need to do some scripting to achieve this. Either server side or client side. Consider either hiring someone out or doing some research and learning some coding. I'd recommend your local junior college, or a free online web programming course.

If you have a specific problem with your implementation, post your question here and we will be happy to help, don't expect us to do all the work for you though ;)

Here are some hints to get you started:

  • Use javascript to collect the drop down fields, and create the google maps url string.
  • You can search google maps developer site to find code on embending this into your page.
Byron Whitlock
Thanks, I think i'll hire some1 to do it for me :)
BlueGuy
A: 

You'll need to combine multiple elements into one form element. Use a hidden and some javascript to populate it before submitting.

Something along these lines

<form id="myForm" method="post" action="http://maps.google.com"&gt;
<input id="q" type="hidden" name="q" />
<!-- all your other inputs -->
</form>

Then some javascript:

<script type="text/javascript">
    function Bind()
    {
        // bind FillQ to the submit event of the form
    }
    function FillQ()
    {
        var q = document.getElementById("q");
        q.value = ... // the combination of your other form fields
    }
    Bind();
</script>
Joel Potter
Thanks Joel its harder than i thought , i guess I'll hire some1 to do it for me , i really appreciate ur effort :)
BlueGuy