Javascript,calling child window function from opener doesn't work -


I am developing a web application that opens popups using windows.open (..). I need to call the function on the opened window using the handle given by "window.open", but I'm always getting the error message "addWindow.getMaskElements function is not", such that this function can not declare the hair It has behavior in both IE and FF on the window. My code looks like this:

  AddEmail (target, category) function {if (addWindow == tap) {currentCategory = category; Var left = getDialogPos (400,220) [0]; Var Top = Radialogopos (400,220) [1]; AddWindow = window.open ("adicionar_email.htm", null, "height = 220px, width = 400px, position = no, resizable = no"); AddWindow.moveTo (left, top); AddWindow.getMaskElements (); }}  

I have read and read from different reliable sources and apparently have to do this work, though it is not. One more thing, in the child window, the function is declared in a separate .js file which is called ADCIener_Email. The HTM file is included in. Does this make a difference? It should not be .. So, if anyone has participated in a similar problem, or I am doing wrong then answer me on this message. Thanks in advance.

Kenya

The construction of the window is not a blocked operation; The script continues to run, while opening and loading that window. Javascript and parsing

If you want to add a link to your original page like this:

  & lt; A href = "#" onclick = "addwindow.getMaskElements ();" & gt; Test & lt; / A & gt;  

You will see that it works (I tried to ensure it.)

** Edit **

Someone else Here's another way of posting an overload call in the target document; Here's another way:

AddEmail () function {if (Edwardo == empty) {addWindow = window.open ("test2 .html ", blank," height = 220px, width = 400px, position = no, resizable = no "); } If (! AddWindow.myRemoteFunction) {setTimeout (ed email, 1000); } And {addWindow.myRemoteFunction (); }}

This tries to call addWindow.myRemoteFunction, it manages to call it successfully for every second seconds.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -