?
Solved

check check-box to continue to next page

Posted on 2011-03-04
3
Medium Priority
?
485 Views
Last Modified: 2012-05-11
hi

i have a check-box on my page, i would like it to be checked before a button to the next page will become active.
(the check-box says accept our terms)

how can this be done?

Thanks!
0
Comment
Question by:peps03
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Expert Comment

by:Umar Topia
ID: 35036124
You can keep the button disable initially and on check changed event of your checkbox you can check whether current value of checkbox is checked or not... if yes then enable the button otheriwse disable the button
0
 
LVL 9

Accepted Solution

by:
jkofte earned 2000 total points
ID: 35036136
here is the working code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PAGE</title>
<script type="text/javascript">
function CheckEnabled()
{
	if (document.getElementById('myCheckBox').checked)
	{
		document.getElementById('myButton').disabled = '';
	} else 
	{
		document.getElementById('myButton').disabled = 'disabled';
	}
}
</script>
</head>
<body>
<input id="myCheckBox" type="checkbox" onclick="CheckEnabled()" /> 
<input id="myButton" disabled="disabled" type="button" value="My Button" />
</body>
</html>

Open in new window

0
 

Author Closing Comment

by:peps03
ID: 35036211
great!!

thank you very much!!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question