www.webdeveloper.com
Results 1 to 3 of 3

Thread: Simple checkbox function

  1. #1
    Join Date
    May 2008
    Posts
    2

    Simple checkbox function

    Folks,

    I need a very simple checkbox function. When one checkbox is checked, one field within the same form should be populated with a specific value that will be a variable within the function, an not the checkbox value. Also the html trigger code. That's it.

    Thank you,

    Omer

  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,357
    What have you tried so far?

  3. #3
    Join Date
    May 2008
    Posts
    2
    Keep in mind I'm not a programmer. I copied pieces from other functions but it's really a Hail Mary pass:

    function cbevent(form) {

    var fieldFVal = "";

    var fieldF = "PRroom";


    {

    if (elements[Private_room_request].checked)
    elements[fieldF].value = "$120";
    else elements[fieldF].value = fieldFVal;


    }
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles