none
How to get the html element of the pop-up window?

    Question

  • Guys,
           I'm not sure whether it is the suitable place to ask this question. 
     
           I'm .net programmer, and use the library microsoft.mshtml.dll to get the elements of the web page, we can get all html elements in the page, it's great. But sometimes, when the javascript "window.prompt" was executed in the page, then the new pop-up window will be show. Now at this time, I can't get the element of the pop-up window, any ideas for it? Thanks a lot.

    Regards
    Jian Hua
    Monday, September 21, 2009 3:39 PM

Answers

  • You are not able to get element of popup window because the page of popup window is different. So you will have use popup page to get it's element

    Gaurav Khanna
    • Proposed as answer by eryang Monday, September 28, 2009 3:20 AM
    • Marked as answer by eryang Monday, September 28, 2009 6:01 AM
    Tuesday, September 22, 2009 6:39 AM

All replies

  • for pop up window you should use this
    <script type="text/javascript">
    // Popup window code
    function newPopup(url) {
     popupWindow = window.open(
      url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
    }
    </script>
    Regards
    Varun Kumar
    • Proposed as answer by varun007 Tuesday, September 22, 2009 6:27 AM
    Tuesday, September 22, 2009 6:27 AM
  • You are not able to get element of popup window because the page of popup window is different. So you will have use popup page to get it's element

    Gaurav Khanna
    • Proposed as answer by eryang Monday, September 28, 2009 3:20 AM
    • Marked as answer by eryang Monday, September 28, 2009 6:01 AM
    Tuesday, September 22, 2009 6:39 AM
  • Hi,
    If you still troubled by the case, you may consider posting the question to http://forums.asp.net where asp.net experts live in, goog luck!

    Thanks,
    Eric

    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    Monday, September 28, 2009 3:20 AM