Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: value in forms

  1. #1
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    I found this piece of code somewhere when I was trying to learn about forms, Can someone tell me what does "value" do in the code below? Even if I delete value"bike" etc... it still displays the form. So what is the difference? But when i use value with a submit type button, it display it. <form>I have a bike:<input type="checkbox" name="vehicle" value="Bike"><br>I have a car: <input type="checkbox" name="vehicle" value="Car"><br>I have an airplane: <input type="checkbox" name="vehicle" value="Airplane"></form>Thanks

  2.  

  3. #2
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    Purely backend stuff. If you use <form method="get" action="someurl"> you'll see what I mean. The above code will result (if all the checkboxes are checked), something like this: "someurl?vehicle=Bike&vehicle=Car&vehicle=Airplane ". If a checkbox is unchecked, that entry is omitted. I'm not sure what removing the "value" will do.
    Hyperair

  4. #3
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Target is to specify which frame to send the results to.

    http://www.htmlcodetutorial.com/forms/_FORM_TARGET.html

  5. #4
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    Thanks bfsog. I've corrected it in my post above.
    Hyperair


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:57 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com