U
usgog
I have the following code in my html file. Somehow the "retry" div is
always displaying and it has "addr has no properties" js error. What I
want is: NOT display "retry" div and only display after clicks "the
URL" link. Anything is wrong in the code?
------------------------------------------------------------------------------------------------------------------------------
<script type="text/javascript"><!--
function toggleRetry(val) {
var addr = document.getElementById('retry')
if (val) {
addr.style.display='';
} else {
addr.style.display='none';
}
}
//--> </script>
<script>toggleRetry(true)</script>
<h3 style="margin-bottom:0px;margin-top:0px;">Test<a href="#"
onclick="toggleRetry(true)">the URL</a>.</h3>
<div id="retry" style="display:block">
<table>
<tr>
<td>Display Retry</td>
</tr>
</table>
</div>
always displaying and it has "addr has no properties" js error. What I
want is: NOT display "retry" div and only display after clicks "the
URL" link. Anything is wrong in the code?
------------------------------------------------------------------------------------------------------------------------------
<script type="text/javascript"><!--
function toggleRetry(val) {
var addr = document.getElementById('retry')
if (val) {
addr.style.display='';
} else {
addr.style.display='none';
}
}
//--> </script>
<script>toggleRetry(true)</script>
<h3 style="margin-bottom:0px;margin-top:0px;">Test<a href="#"
onclick="toggleRetry(true)">the URL</a>.</h3>
<div id="retry" style="display:block">
<table>
<tr>
<td>Display Retry</td>
</tr>
</table>
</div>