+ Post New Thread
Results 1 to 3 of 3
Web Development Thread, Any Jquery Experts here in Coding and Web Development; I need to be able to check for a tick box then show or hide a field and depending on ...
  1. #1

    Join Date
    Jul 2010
    Posts
    577
    Thank Post
    67
    Thanked 26 Times in 21 Posts
    Rep Power
    14

    Any Jquery Experts here

    I need to be able to check for a tick box then show or hide a field and depending on that result clear a value from a field.

    I have some code that i can PM if someone can help

  2. #2
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    895
    Thank Post
    84
    Thanked 235 Times in 194 Posts
    Rep Power
    82
    PM me your code fella... and workflow. Check for tick box & it's status on pageload? Or watch tick box for an event? Or both?

  3. Thanks to Marci from:

    mac_shinobi (24th February 2014)

  4. #3

    Join Date
    Dec 2012
    Location
    Skipton, North Yorkshire
    Posts
    27
    Thank Post
    11
    Thanked 3 Times in 3 Posts
    Rep Power
    15
    I'm presuming you want to register listeners on both the checkbox (to show the hidden field) and the hidden field itself (to clear the value from some other field), so something like this:

    Code:
    $("#checkbox_selector").on('change', function() {
      if (this.checked)
        $("#hidden_field_selector").show();
      else
        $("#hidden_field_selector").hide();
    });
    
    $("#hidden_field_selector").on('change', function() {
      if ($(this).val() == "whatever")
        $("#some_other_field").val("");
    });
    Perhaps.

SHARE:
+ Post New Thread

Similar Threads

  1. syncinc audio and video - any experts here?
    By RabbieBurns in forum AV and Multimedia Related
    Replies: 13
    Last Post: 14th January 2010, 06:07 AM
  2. Any Access experts here?
    By boomam in forum Office Software
    Replies: 8
    Last Post: 25th April 2008, 10:47 AM
  3. Any Cumbria techs here?
    By Geoff in forum General Chat
    Replies: 3
    Last Post: 4th April 2008, 11:05 AM
  4. Any Lancsngfl People here!
    By Paul_L in forum General Chat
    Replies: 7
    Last Post: 19th March 2008, 04:21 PM

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
  •