homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

IE 8 Visibility problem

WebmasterWorld Senior Member 5+ Year Member

Msg#: 3982041 posted 3:28 pm on Sep 1, 2009 (gmt 0)

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]



10+ Year Member

Msg#: 3982041 posted 3:25 pm on Sep 2, 2009 (gmt 0)

Change the onchange event to onclick.

HTH, Tom

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved