Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

IE 8 Visibility problem



3:28 pm on Sep 1, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

I set a span to visible on a checkbox check. It works fine in FF but in IE 7 and 8 the link won't show until you check the box and then click out of it. Any idea why? Here is my html
<span style="font-size:11px; font-family:Arial;">
<input type="checkbox" id="overRide" onfocus="showOverRide()" onchange="showLink()" /> Overide Coordinates
<span id="linkSpan" style="visibility: hidden; padding-left: 5px;
font-size: 11px; font-family: arial;">
<br /><a href="http://example.com/latlong.html">Manual Lookup</a>

and here is my JS
//this function shows the link to get
//coordiantes manually if the checkbox is checked
function showLink() {

//if the checkbox is checked
if (document.getElementById('overRide').checked) {

//set the span to visible
document.getElementById('linkSpan').style.visibility = "visible";

} //if .checked
else {

//set the span to hidden
document.getElementById('linkSpan').style.visibility = "hidden";

} //showLink

//this function displays the over ride tool tip
//when a user hovers over the over ride checkbox
function showOverRide() {

var toolTip = $find("<%= overRideTip.ClientID %>");
if (!(toolTip.isVisible())) {


} //if ! issvisible

} //showOverRide

I posted the showOverRide function but it works fine. I just posted it in case it might have something to do with this since they both go on the same checkbox click. Thanks,

[edited by: eelixduppy at 1:12 am (utc) on Sep. 2, 2009]
[edit reason] example.com [/edit]


3:25 pm on Sep 2, 2009 (gmt 0)

10+ Year Member

Change the onchange event to onclick.

HTH, Tom


Featured Threads

Hot Threads This Week

Hot Threads This Month