Click here to Skip to main content
15,899,007 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to figure out a way where I will first launch an IE window, with say a Log on page. The user will enter his details and login.

I want to use the same IE instance to launch windows with different URL belonging to the same site.

I am not sure how to achieve this. Requesting Help.

Thank You,
-Bhaskar
Posted

1 solution


  1. You can achieve this via javascript by using the window.open function.

    Please use google to find a reference for this function. When you open an IE window via javascript a reference window object will be returned. If you keep that in some managing structure you can do a lot of neat stuff with these "window handles". The javascript code in the window that opened the "child" window has full control over this child.


  2. Use links on your page with the anchor tag like this:


    <a href="..\Page.aspx" target="windowName">Text for link<a>

    You can control which window a link will be displayed in by using the same name in the target attribute of the anchor tag.



Hope that helps you! If you still have doubts leave a comment.

Cheers!
 
Share this answer
 
v2
Comments
bhaskar82in 10-Mar-11 0:44am    
Hi Manfred,

Thanks for your suggestion. The application I am working on is a Windows Application. And achieving this kind of functionality is a challenge I am facing. Do you have an idea on how to go about this in a Windows Forms Application?

-Bhaskar
Manfred Rudolf Bihy 14-Mar-11 6:00am    
Sorry you'll have to exlain in more detail what you're trying to do. Launching an IE from your windows application shouldn't be an issue. Starting child windows from an IE can be done with javascript or links as I described. Without knowing your requirements it's hard to give you good advice.
bhaskar82in 14-Mar-11 11:21am    
Hi Manfred,

Thanks. I have figured out a way to do it. Please read: http://www.codeproject.com/Questions/168334/Internet-Explorer-Object-navOpenInNewWindow.aspx

Thank You,
-Bhaskar

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900