Avatar of kimberlys777
kimberlys777
Flag for United States of America asked on

How do I disable a button in frontpage?

I have a hyperlinked button on a form in frontpage.  I want it to be hidden or disabled until a checkbox is selected.  I want it to function like the pages where you have to agree to some terms and conditions before you're able to click on another button.  The code for the button is attached (the checkbox hasn't been made yet)  My code is attached
<a href=www.mypage.com>
     <img border="0" id="img1" src="button2.jpg" height="20" width="80" alt="YES"  onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button4.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button3.jpg')" fp-style="fp-btn: Glow Rectangle 8; fp-proportional: 0" fp-title="YES"></a>

Open in new window

JavaScript

Avatar of undefined
Last Comment
tolgaong

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jagadishwor Dulal

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
kimberlys777

ASKER
Perfect!  Thanks for the quick response!!
tolgaong

<html>
 <head></head>

 <body>
  <div> Toggle  <input type = "checkbox" onclick = "document.getElementById('a_lnk').style.display=(this.checked?'':'none');"
	   checked = "checked" />
  </div>

  <a href = "www.mypage.com" id = "a_lnk">
  <img border = "0" id = "img1" src = "button2.jpg" height = "20" width = "80" alt = "YES"
	  onmouseover = "FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')"
	  onmouseout = "FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')"
	  onmousedown = "FP_swapImg(1,0,/*id*/'img1',/*url*/'button4.jpg')"
	  onmouseup = "FP_swapImg(0,0,/*id*/'img1',/*url*/'button3.jpg')"
	  fp-style = "fp-btn: Glow Rectangle 8; fp-proportional: 0" fp-title = "YES"></a>
 </body>
</html>

Open in new window

Your help has saved me hundreds of hours of internet surfing.
fblack61