Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Java script example: button requiring checkbox to be che
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows Server 2003
Database:
Visual FoxPro
Divers
Thread ID:
01087958
Message ID:
01088117
Vues:
10
>Does anyone have an example of some java script that, on the click of a html form button, checks that a checkbox on the page is in fact checked before action is taken on the button submit?
>
>Something like:
>
>'x' I have read and agree to the policy
>
>
Here is a "cheap" way. But a radio button may also be a good preference
<HTML><HEAD><script type="text/javascript" language="JavaScript">
function runSetCheck()
{
theform.theCheck.value="X";
}
</script>
</head>
<body>
<form name="theform">
<H4>Click to Check the Check</H4>
<table align="left" border=".1" >
<tr><th align="left" width="100">Click to Check.</tr>
<td width = "2"><input type="button" value="Set the Check" name="doSetCheck" language="JavaScript"
onclick="runSetCheck();"><td width = "10">theCheck<input type="text" align="bottom" name="theCheck" value="" size="10" ></td></td></tr>
</form>
</body>
</html>
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform