|
|
#1 |
|
New Member
![]() Join Date: Sep 2011
Location: Ontario Canada
Posts: 1
|
I've searched the Forum but did not locate an answer to my query.
I've built a website and i took advantage of iframes especially with facebook and twitter like/follow buttons. But I've found that they don't display properly or at all in some older browsers such as firefox 3.6. I wanted to write an if statement so that if a person wasn't using a "modern or current" browser it would show a separate message instead of a blank area or error message. The only if statement I've ever written was something simple like : <script type="text/javascript"> var d = new Date(); var time = d.getHours(); if (time < 10) { document.write("Good morning and Welcome to my site!"); } else { document.write("Good day and Welcome to my site!"); } </script> Any help would be greatly appreciated |
|
|
|
|
|
#3 |
|
New Member
![]() Join Date: Sep 2011
Posts: 5
|
Here's another complete script that does an excellent job of outlining the parts of the code: http://www.quirksmode.org/js/detect.html
__________________
eod Media - Web Design & Development |
|
|
|
![]() |
| Tags |
| browser compatability, firefox, if statement, iframe |
| Thread Tools | |
| Display Modes | |
|
|