Show an alert

I wish to give user an alert if the user is using IE9 or old IE browser.
in that case alert message is " You are using old IE browser : IE version_No. Please upgrade your IE browser "

What is the way ?

Google searching for “ie9 browser alert” revealed:

Do either of those scripts/methods solve your problem?

JavaScript can detect which browser is being used, but I wouldn’t use an alert() to display the message. Use a hidden DIV to contain the message and have it appear (along with an ‘X’ to close it) if IE is 9 or older.


1 Like

1 Like

how to do it in javascript ? Could u please post a sample.

I want to check if IE browser version is 9 or lower.

I already have Jquery.

I would probably use conditional comments.

<!--[if lte IE 9]>
  <script>alert("You are using IE 9 or lower")</script>

You can also do it completely in JavaScript using conditional comments.

  @if (@_jscript)
alert("You are using IE 9 or lower")

IE9 is last version of IE to support conditional comments so you could just say “if IE” :slight_smile: .

I didn’t know you could do that.

Good point : )

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.