hello i have a custom prompt box you can see here the problem you will see is that the value entered in the prompt appears then disappears can you please help here is my code.
<head>
<style type="text/css">
<!--
#customPrompt {
position:absolute;
left:65px;
top:69px;
width:279px;
height:143px;
z-index:2000;
background-color: #FF9900;
}
-->
</style>
<script type="text/javascript">
function showEl(id)
{
var el = document.getElementById(id);
el.style.display = "";
}
function hideEl(id)
{
var el = document.getElementById(id);
var su_val=document.pro.myNumber.value;
document.getElementById('test_span').innerHTML = su_val;
el.style.display = su_val;
}
</script>
</head>
<body>
<!-- CUSTOM FLOATING PROMPT -->
<div id="customPrompt" style="display:none;">
<p>Enter some number</p>
<p>
<form name=pro>
<input type="text" id="myNumber" />
<input type="submit" name="button" id="button" value="Submit" onClick="hideEl('customPrompt')" />
</form>
</p>
</div>
<!-- END CUSTOM PROMPT -->
<p><a onClick="showEl('customPrompt')" style="cursorointer;"> Open Prompt </a> </p>
<p><span id=test_span></span> </p>
</body>
thanks in advance
<head>
<style type="text/css">
<!--
#customPrompt {
position:absolute;
left:65px;
top:69px;
width:279px;
height:143px;
z-index:2000;
background-color: #FF9900;
}
-->
</style>
<script type="text/javascript">
function showEl(id)
{
var el = document.getElementById(id);
el.style.display = "";
}
function hideEl(id)
{
var el = document.getElementById(id);
var su_val=document.pro.myNumber.value;
document.getElementById('test_span').innerHTML = su_val;
el.style.display = su_val;
}
</script>
</head>
<body>
<!-- CUSTOM FLOATING PROMPT -->
<div id="customPrompt" style="display:none;">
<p>Enter some number</p>
<p>
<form name=pro>
<input type="text" id="myNumber" />
<input type="submit" name="button" id="button" value="Submit" onClick="hideEl('customPrompt')" />
</form>
</p>
</div>
<!-- END CUSTOM PROMPT -->
<p><a onClick="showEl('customPrompt')" style="cursorointer;"> Open Prompt </a> </p>
<p><span id=test_span></span> </p>
</body>
thanks in advance