Jump to content

Hide A Browse Button When A Specific Box Is Checked


Go to solution Solved by kicken,

Recommended Posts

Hi All,

 

I am trying to find a way to hide the Browse button when the user checks a box. I found the solution when the page has just one pair of browser button/checkbox (http://jsfiddle.net/xSvLc/53/).

 

However since the PHP-generated form is likely to contain multiple browser button/checkbox pairs, I do not know how to implement the JS function in this situation. I tried to (http://jsfiddle.net/xSvLc/58/), but it does not work.

 

Thanks for your help !

 

PhD

  • Solution

What you wrote will work, the problem is that you have jsfiddle configured to wrap your code in an onload event which means your showhide function is no longer available at the global scope. If you either change the fiddle settings or export that function to the global scope then it works fine:

 

- http://jsfiddle.net/xSvLc/59/

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.