3

I just created a monitor page for out product services. The user would use the page to check the status of different services.

What I would like to do now is whenever the browser is minimized and there is an alert, I would like to make the browser icon on the taskbar blink , so that it captures the users attention.

Is there a way I can do it ?

I looked at the following link : Make browser window blink in task Bar

but it just makes the title blink . I also looked at HTML 5 notifications, but I am not sure on how to include them onto my C#, asp.net code. I think using signalR would be an over kill.

So if you could please direct me to another way of accomplishing the task it would be great .

Community
  • 1
  • 1
CodeNinja
  • 3,188
  • 19
  • 69
  • 112
  • Have you tried granting focus() to the window? I think that will work but not necessarily sure it's cross-browser compatible. You may have to blur() the focus on the window first. – trnelson Nov 07 '13 at 21:11

1 Answers1

0

javascript has no problem with asp.net,u can add u'r code in tag. example off use js in asp.net:

<head>
<script>
//paste your javascript code hear 
</script>
</head>

and u can call your function for example:

<asp:Button runat="server" ID='next' OnClientClick="return Functionname();" />

another example: http://www.w3schools.com/js/js_functions.asp

example off use js(javascript) in c#:

protected void Page_Load(object sender, System.EventArgs e)
 {
      myScript = "\n<script type=\"text/javascript\" language=\"Javascript\" id=\"EventScriptBlock\">\n";
        myScript += "alert('hi');";
        myScript += "\n\n </script>";
     Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", myScript, true);
 }
reza jafari
  • 1,228
  • 13
  • 14