Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Thanked 0 Times in 0 Posts

    Need help passing js var to html form.

    Hi there everyone!

    I'm trying to build a member map system using Google's js v3 api. I've built the page that allows a user to set their location, but I'm having problems figuring out how to then send that location as post data through a form.

    Here is the page in question.

    I need to store the latlong data for populating the map on another page, so it looks from the head code that I want the variable "marker". So I tried:

    <input type='hidden' name='latlong' value='<script language="JavaScript">document.write(marker);</script>' />
    But on submission, it's blank.

    I'm searching on updating via onclick, but I'm just not savvy enough to figure it out.

    I really have no idea how to handle this issue and am so in the dark that I'm not even really sure how to search for the resolution yet.

    I would be eternally grateful if someone would help me get a successful passing of that marker variable.
    Last edited by schwim; 11-22-2012 at 08:27 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts