Encontrar el nombre de una ventana emergente en JavaScript
Frecuentes
Visto 7,976 veces
2
I am creating multiple popup windows for chatting. Now my problem is how to find uniquely from which SendMessage() is called from popup window for sending message to other person. At least how to find the name of pop window.
Please help me so that I can move forward
2 Respuestas
5
to just answer your question, it is the name
propiedad la window
objeto.
window.name
por ejemplo:
var myWindow = window.open('','someName','width=200,height=100');
myWindow.document.write("<p>This window's name is: " + myWindow.name + "</p>");
Respondido 28 ago 12, 13:08
Thank you very much for response .It helped me. - sasi krishna
2
You can provide your name to the window like this
window.open(URL,name,specs,replace);
myWindow=window.open('','MsgWindow','width=200,height=100');
myWindow.document.write("This window's name is: " + myWindow.name );
¡Salud
respondido 26 nov., 15:14
Thanks for ur response.it helped me. - sasi krishna
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas javascript popup or haz tu propia pregunta.
Could you please provide more details? The question is quite vague, in my opinion. I'm not even sure what SendMessage() is. ;-) Is it a built in function? Something you wrote? Maybe explain more about what you're hoping to accomplish because there might also be a better alternative. - senfo
Are you trying to get find out the
name
variable of a previous call towindow.open(name, url [, ...])
? - line-o@line-o it's
(url, name [, ...])
:PAG - jbabeySendMessage() is not a built in function but a user defined method to send msgs using websocket. - sasi krishna