Hi, i need to access controls placed on behind opener xpage A.
i placed a button on page B, with client javascript : window.opener.document.getDocumentById(“#{id:yyy}”)
It doesn’t work.
Thanks
Diego
Sorry, (I speak spanish)
Hi, i need to access controls placed on behind opener xpage A.
i placed a button on page B, with client javascript : window.opener.document.getDocumentById(“#{id:yyy}”)
It doesn’t work.
Thanks
Diego
Sorry, (I speak spanish)
Subject: Re: XPages: Client Javascript - getting accces to behind xpage opener
Hi Diego,
I think the function that you are looking for is window.opener.document.getElementById(). This will find an element in the DOM of the browser window that opened the popup window or tab that you are on (assuming it’s still open of course).
You can also access DOM elements using dojo.query() which provides a convenient way of selecting one or more elements using a CSS style query syntax. For example you could select all the links with a class of ‘external’ inside a particular panel using one single query like so:
dojo.query(‘#view:id1:container a.external’);
If you’re trying to get access to data from a Notes Document you’ll have to load that information from the Domino server somehow, either by using a raw XMLHttpRequest, or one of the built in XPages controls.
Hope that answers your question, if not could you maybe include a little more information on your use case?
Subject: resolved
Hi Lorcan, thank you very very very much for your information. That you say it’s true.I was tryed windows.opener.document… but it didn’t work. I think it was a problem with using not real parsed controls IDs. I didn’t try again, but i’ll try it in the future.
My really problem was, i need a dialog(popup window). Then, i resollved with a dojo Dialog :).