livinthailandos Posted June 8, 2009 Share Posted June 8, 2009 I got this working with firefox but it won't work with internet explorer, i'm still quite a newbie with html learning. any ideas on how to get this javascript working on internet explorer <tr> <td width="21%"><strong><big><script type="text/javascript"> var txt="Lunch Specials"; document.write("<p> " + txt.blink() + " </p>"); </script></big></strong></td> </tr> Link to comment Share on other sites More sharing options...
bino Posted June 8, 2009 Share Posted June 8, 2009 (edited) Blinking text is kinda obnoxious - but if you gotta have it, here is a cross-browser solution: Put this code in the head of your page: <script> function doBlink() { // Blink, Blink, Blink... var blink = document.all.tags("BLINK") for (var i=0; i < blink.length; i++) blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" } function startBlink() { // Make sure it is IE if (document.all) setInterval("doBlink()",1000) } window.onload = startBlink; </SCRIPT> Put this code in the body where you want the blinking text to appear. <BLINK SPEED=1000> Lunch Specials </BLINK> Blink speed - 1000 is one second. you can adjust this to your desire - 2000 would be 2 seconds, 500 would be a half second. Be sure to change both instances in the script and the body tag. Choke dee. Edited June 8, 2009 by bino Link to comment Share on other sites More sharing options...
Emeritus Posted June 8, 2009 Share Posted June 8, 2009 I consult w3schools when I try to do something in html and found this about blinking text: www.w3schools.com/jsref/jsref_blink.asp However, I understand that Microsoft Internet Explorer has been designed not to comply with the international standard and therefore a workaround is needed for certain things, and I guess this is what the code posted by bino is about. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now