Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    391
    Thanks
    76
    Thanked 0 Times in 0 Posts

    add form field value to url??

    How can I add a form field value to a url. I tried the below but it no work.

    Code:
    href="index2.php?q=4&id=+document.theForm.lists.value+&picklist"

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    First you will have to identify the link ... maybe it has an id attribute? Let's say it's id="mylink"

    Then you will have to write a script that will do the trick
    Code:
    <script type="text/javascript">
    document.getElementById('mylink').href += '&id=' + document.theForm.lists.value + '&picklist';
    </script>


  •  

    Posting Permissions

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