Subject: window.open()
Posted By: ckrajeshvarma Post Date: 8/6/2006 12:58:19 AM
In my current project I am using Login controls for the authentication.I am not using WAT.I want to make my whole application in full size(window or web form) mode after successfull login(using window.open()).I have give destination url for the Login control and also I have written a client side script to open my index.aspx page in full size after the successfull login,but I am getting 2 pages, 1) my destination page url(index.aspx with master pages and 2)the new window without master pages.I would like to know How can I achieve this???Please help me.....

Reply By: Quick209 Reply Date: 8/9/2006 11:37:47 AM
Having a hard time understanding what you are doing a little.  I see you placed the url for your login control?  is that a postbackurl or a response.redirect()?  I see you used window.open() too.  If you have the page redirecting or posting back to a different url, the main page will change.  If your client script launches first, it will open a new window next to the old window that has not redirected.  Like I said, don't really see what you are doing so it may help if you post some of the code.

Reply By: ckrajeshvarma Reply Date: 8/10/2006 3:35:48 AM
Thanks for your reply
In my login page, I am using Login control(ASP.NET 2.0 control) for the User authentication.In Login control's Authenticate event, I have written the code for user authenication.I have given the Destination page Url as 'index.aspx' for the Login control.Actually I want to make my complete application in windows full mode(size) once the user successfully signed in.In Login control's Authenticate event I have written code like
e.authenticated=true
After this I am calling my index.aspx page using window.open() method in C# (server side code).In my index.aspx page, I have put one menu control.Actually I am getting 2 index pages 1. the original one(destination page url of login control)with menu control and the second one in full size mode but without menu control.When I removed the destination page url of my Login control,I am getting an error.
What I want to do is that I want to get my index.aspx page in full mode(size) without any toolbars instead of giving the destination page url in Login control.
Thanks


Reply By: Quick209 Reply Date: 8/12/2006 8:30:17 PM
I am stumped on how to do this as i can see hat is happening.  The control needs a destination url for authenticated user.  You could trying making an intermediate page with some javascript that opens your index.aspx in the size you want to and then closes itself.  Then you could make your destination url that one.  Unless someone has an idea on how to make a page set its own window size upon load.  Not that deep in javascript yet.

Reply By: ckrajeshvarma Reply Date: 8/15/2006 6:08:56 AM
I could solve this problem by giving the destination page url as some other test(eg:test.aspx) page instead of giving as index.aspx.After that, In the page load event of the test page(test.aspx), I wrote the code to open my index.aspx page in full screen mode.

Reply By: Quick209 Reply Date: 8/16/2006 9:13:19 AM
That is the only way I can see it working.  The reason why you were getting 2 pags before is because when authenticated, the destination url is brought up but of course with no window size settings. When authentication was confirmed, your java script was also being launched giving you 2 pages.  If you want ot use the login control, you have the use the destination url which I can see gives you settings for setting the window's size so the only way is to feed it a intermediate page that will load the page you want in the size you want and then close itself.  Other way is to not use the control and build a custom login method that will only run your javascript on if authenticated.

quote:
Originally posted by ckrajeshvarma

I could solve this problem by giving the destination page url as some other test(eg:test.aspx) page instead of giving as index.aspx.After that, In the page load event of the test page(test.aspx), I wrote the code to open my index.aspx page in full screen mode.





Go to topic 48380

Return to index page 202
Return to index page 201
Return to index page 200
Return to index page 199
Return to index page 198
Return to index page 197
Return to index page 196
Return to index page 195
Return to index page 194
Return to index page 193