phdphd Posted February 26, 2014 Share Posted February 26, 2014 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 Link to comment https://forums.phpfreaks.com/topic/286552-hide-a-browse-button-when-a-specific-box-is-checked/ Share on other sites More sharing options...
kicken Posted February 26, 2014 Share Posted February 26, 2014 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/ Link to comment https://forums.phpfreaks.com/topic/286552-hide-a-browse-button-when-a-specific-box-is-checked/#findComment-1470794 Share on other sites More sharing options...
phdphd Posted February 26, 2014 Author Share Posted February 26, 2014 Thanks Kicken! Link to comment https://forums.phpfreaks.com/topic/286552-hide-a-browse-button-when-a-specific-box-is-checked/#findComment-1470801 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.