am having trouble with this small java-script problem

how can i make a link button clickable after an event lets say clicking a check-box or another button ...example when you want to install a software you see the next button but can not click it until you check the check-box of accepting terms and getme!!! pliz write me the sniplet,,,thanks

Member Avatar for stbuchok

Please try to code it yourself, then when you get stuck on a particular piece of the code ask for help. Don't just ask people to write the code for you, that's not what we are here for.

am having trouble with this small java-script problem

how can i make a link button clickable after an event lets say clicking a check-box or another button ...example when you want to install a software you see the next button but can not click it until you check the check-box of accepting terms and getme!!! pliz write me the sniplet,,,thanks

<form  autocomplete="off">
	<input type=checkbox onchange="toggleProp(document.forms[0].button,'disabled',0)">
	I accept<br> 
	<input type=button name="button" value=Next onclick="yourFunction()" disabled>
	continue
</form>
<script>
	toggleProp=
	/*b.b Troy III p.a.e*/
	function(e,p,v){e[p]==v?e[p]=e.b:(e.b=e[p],e[p]=v)}
</script>

to make sure it keeps in sync on page refresh bug introduced by "modern browser" idiocy,
-add this function to the script:

onload=function(){document.forms[0].reset()}

what i acctual needed was that some one has to clickthe table content ie the link below "jimm" so as to make the "next" button clickable

<!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>Untitled Document</title>
<style type="text/css">
</style>
</head>

<body>
<script>
	toggleProp=
	/*b.b Troy III p.a.e*/
	function(e,p,v){e[p]==v?e[p]=e.b:(e.b=e[p],e[p]=v)}
</script>
<form  autocomplete="off">
	<input type=checkbox onchange="toggleProp(document.forms[0].button,'disabled',0)">
	I accept<br> 
	<input type=button name="button" value=Next onclick="yourFunction()" disabled>
	continue<br><hr><hr><hr>

what i acctual needed was that some one has to clickthe table content ie the link below "jimm" so as to make the next button clickable 


<table border="0" width="100%" cellpadding="0">
<tr>
    <td valign="top"> 
<a href="#">jimm<a/>
<td/>
<tr/>
<table/>
<br>
<input type=button name="butto" value=Next>

    
</form>
</body>
</html>

what i acctual needed was that some one has to clickthe table content ie the link below "jimm" so as to make the "next" button clickable

<!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>Untitled Document</title>
<style type="text/css">
</style>
</head>

<body>
<script>
	toggleProp=
	/*b.b Troy III p.a.e*/
	function(e,p,v){e[p]==v?e[p]=e.b:(e.b=e[p],e[p]=v)}
</script>
<form  autocomplete="off">
	<input type=checkbox onchange="toggleProp(document.forms[0].button,'disabled',0)">
	I accept<br> 
	<input type=button name="button" value=Next onclick="yourFunction()" disabled>
	continue<br><hr><hr><hr>

what i acctual needed was that some one has to clickthe table content ie the link below "jimm" so as to make the next button clickable 


<table border="0" width="100%" cellpadding="0">
<tr>
    <td valign="top"> 
<a href="#">jimm<a/>
<td/>
<tr/>
<table/>
<br>
<input type=button name="butto" value=Next>

    
</form>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Untitled Document</title>
<style>
</style>
<script>
	toggleProp=
	/*b.b Troy III p.a.e*/
	function(e,p,v){e[p]==v?e[p]=e.b:(e.b=e[p],e[p]=v)}
</script>
</head>

<body>
what i acctual needed was that some one has to clickthe table content ie the link below "jimm" so as to make the next button 

clickable 

<table>
 <tr>
  <td><a href="javascript:toggleProp(document.forms[0].butto,'disabled',0)">jimm</a></td>
 </tr>
</table>
<br>
<form>
 <input type=button name=butto value=Next onclick="yourFunction()" disabled>
</form>
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.