36 users online (2 members and 34 guests)  

Thread: form input


  Results 1 to 6 of 6

Related

  1. form input changes textarea output    Forum: Javascript Forum
    Replies: 1
  2. Help W/ interactive user input form    Forum: Javascript Forum
    Replies: 1
  3. Form input link    Forum: HTML Forum
    Replies: 9
  4. Form input type    Forum: HTML Forum
    Replies: 1
  5. HTML Form input types    Forum: HTML Forum
    Replies: 3
  1. #1
    gncreditcards's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2008
    Posts
    5

    form input

    I want add, every time I click the Button Vote add 1 for example in the form have a text and button when click the button in the text have 1. I want to increase this number. ?

    <form name="Vote">
    <input type="text" value="" name="sky">
    <input type="hidden" value="1" name="blue">
    <input type="button" value="Vote" onClick="document.Vote.sky.value =(document.Vote.blue.value)">
    </form>

  2. #2
    fric's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Apr 2007
    Location
    Mauritius
    Posts
    25

    Re: form input

    i don't clearly understand what you want but did an increment script based on the one you put there:

    <html>
    <head>
    <script language="javascript">
    var tmp2 = 0;
    function increment()
    {
    var tmp = parseInt(document.Vote.blue.value);
    tmp2 += tmp;
    document.Vote.sky.value = tmp2;

    }

    </script>
    </head>
    <body>
    <form name="Vote">
    <input type="text" value="" name="sky">
    <input type="hidden" value="1" name="blue">
    <input type="button" value="Vote" onclick="increment();">
    </form>
    </body>
    </html>

    hope this help

  3. #3
    gncreditcards's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2008
    Posts
    5

    Re: form input help increase

    Thank you for this help, but Al put the script on my website where visitors click on Voting increases the number in the vote of the page and when refresh the site when the increase in the voting to begin again in 1 please Help

  4. #4
    skym's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2008
    Location
    Oradea, Romania
    Posts
    10

    Re: form input help increase

    You need a server-side script for this, and probably databases to store the votes.

  5. #5
    gncreditcards's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2008
    Posts
    5

    Re: form input

    How create a Database Free and how do the script to use vote form

  6. #6
    skym's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2008
    Location
    Oradea, Romania
    Posts
    10

    Re: form input

    You can learn PHP and Mysql on w3school.com for example. Official sites: php.net and mysql.com



Tags for this Thread