window.focus(), self.focus() not working in firefox
- by Nisanth
Hi all i am developing a chat application ... i have multiple chat windows ... i want to know which windw contain new message ... i have the following code ..
function getCount()
{
$.ajax({
type: "POST",
url: baseUrl + '/Chat/count',
data: "chat_id=" + document.ajax.chat_id.value,
success: function(msg){
if(msg == 'new1') {
self.focus();
//window.focus();
}
}
});
}
If an operator attending both chat....
for example the url is like
http://localhost/nisanth/admin/Chat/index/chatId/15
http://localhost/nisanth/admin/Chat/index/chatId/16
http://localhost/nisanth/user/Chat/index/chatId/15
http://localhost/nisanth/user/Chat/index/chatId/16
if the user 16 enter a message i need focus
http://localhost/nisanth/admin/Chat/index/chatId/16
This code is work fine with IE but not in firefox...please give me a solution... the above code is in the same html