If Statements

Ciza

New Member
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
 

CaldwellYSR

Member
Check this out. Hopefully it helps, I don't have time to try to explain it right now but if you still don't get it and nobody else has explained then I'll come back tonight and do it.
 
Top