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
    New Coder
    Join Date
    May 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript Submit Form

    I would like to get info from a check box via link or other method. I believe it can be done with javascript with code something like follows?? Sugestions on getting this to work

    <form id="form1" name="form1" method="post" action="">
    <label>


    <p>
    <input type="checkbox" name="install" value="checkbox" />
    </p>
    <SCRIPT language="JavaScript">
    function submitform()
    {
    document.form1.submit();
    }
    </SCRIPT>

    <? $n=$_Get["checkbox"];printf("$n");?>
    </form>

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Yes, but you need an event (onclick, onchange,...) applied upon an element, event wich will call the function, following the user's action.

    Now, which could be that action? Can't you simply use a submit button?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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