stalepretzel59
05-03-2006, 11:49 AM
This is a simple page: Click the button, confirm you want to learn a secret, and get alerted OMFG. Also, below the button, is some text which says "click." Clicking it should make the first button appear and disappear... but it does not! <thickAccent>I could spit!</thickAccent>
Anyway, here's the code.. could somebody help me?<html>
<head>
<script type="text/javascript">
function wowow(){
document.getElementById('right').classValue="show"
document.getElementById('mkay').onClick="oman()"
}
function oman(){
document.getElementById('right').classValue="hide"
document.getElementById('mkay').onClick="wowow()"
}
function secret()
{
var name=confirm("Are you SURE you want"+'\n'+" to know the secret?")
if (name==true)
{
alert("OMFG")
}
else
{}
}
</script>
</head>
<body>
<style type="text/css">
.hide{display:none}
.show{display:inline}
</style>
<body bgcolor="#339966">
<br /><br /><br /><br /><br /><br /><br />
<div align="center">
<form>
<input type="button" id="right" name="right" onclick="secret()" value="Click this button to learn a secret...">
</form>
<label id="mkay" onClick="oman()">Click</label>
</div>
</body>
</html>
Anyway, here's the code.. could somebody help me?<html>
<head>
<script type="text/javascript">
function wowow(){
document.getElementById('right').classValue="show"
document.getElementById('mkay').onClick="oman()"
}
function oman(){
document.getElementById('right').classValue="hide"
document.getElementById('mkay').onClick="wowow()"
}
function secret()
{
var name=confirm("Are you SURE you want"+'\n'+" to know the secret?")
if (name==true)
{
alert("OMFG")
}
else
{}
}
</script>
</head>
<body>
<style type="text/css">
.hide{display:none}
.show{display:inline}
</style>
<body bgcolor="#339966">
<br /><br /><br /><br /><br /><br /><br />
<div align="center">
<form>
<input type="button" id="right" name="right" onclick="secret()" value="Click this button to learn a secret...">
</form>
<label id="mkay" onClick="oman()">Click</label>
</div>
</body>
</html>