Hola a todos, estoy desarrollando una aplicación de chat ... tengo varias ventanas de chat ... quiero saber qué mensaje contiene nuevo mensaje ... tienen el siguiente código ..window.focus(), self.focus() no funciona en firefox
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();
}
}
});
}
Si un operador asistir tanto el chat ....
por ejemplo, la dirección URL es como 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
si el user 16
introducir un mensaje que necesito enfocarme
http://localhost/nisanth/admin/Chat/index/chatId/16
Este código se funcionan bien con IE pero no en Firefox ... por favor, dame una solución ... el código anterior se encuentra en la mismo html
No veo cómo eso puede funcionar en IE; 'self' no está definido en el código citado. Si se define en otro lugar, es mejor mostrarlo ya que es importante saber a qué se refiere. –
auto o ventana funciona en IE –
¿De qué manera "... quiero saber qué ventana contiene un nuevo mensaje ..." se relaciona con 'focus' que no está haciendo lo que esperaba? (Además, ¿puedes explicar más lo que quieres decir con eso?) –