Promp box in the center of screen
-
Hi, Can anyone please tell me how to get prompt window in the center of screen? Thanks Deepa
deep7 wrote:
Can anyone please tell me how to get prompt window in the center of screen?
You mean Popup window ? In position you are getting right now ? Did you give the top and left position while opening popup window? By default it should be in center.
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
Hi, Can anyone please tell me how to get prompt window in the center of screen? Thanks Deepa
Here it is:
function PopupCenter(pageURL, title,w,h) { var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); }
Reference link.[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
Here it is:
function PopupCenter(pageURL, title,w,h) { var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); }
Reference link.[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
Good Answer ! I have a quick question. I think by default it is in Center. Correct me if I am wrong. :) Thanks !
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
Good Answer ! I have a quick question. I think by default it is in Center. Correct me if I am wrong. :) Thanks !
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
Thanks Abhijit Jana. Well,by default IE momorize last location,last position and last window state of window. If user makes maximize state then close IE window, after re-open it,position and state will be maximized,same go for minimize,normal state and position of IE window. By using javascript we always can set new position and new state of IE's window. Regards.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
Thanks Abhijit Jana. Well,by default IE momorize last location,last position and last window state of window. If user makes maximize state then close IE window, after re-open it,position and state will be maximized,same go for minimize,normal state and position of IE window. By using javascript we always can set new position and new state of IE's window. Regards.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
Cool :) :thumbsup:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
Cool :) :thumbsup:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
Always welcome ;)
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
Thanks Abhijit Jana. Well,by default IE momorize last location,last position and last window state of window. If user makes maximize state then close IE window, after re-open it,position and state will be maximized,same go for minimize,normal state and position of IE window. By using javascript we always can set new position and new state of IE's window. Regards.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
great :thumbsup:
Viral My Site Tips & Tracks
-
great :thumbsup:
Viral My Site Tips & Tracks
Thanks. ;)
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
Hi, Can anyone please tell me how to get prompt window in the center of screen? Thanks Deepa
If you are using ajax then check this out. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx[^]
I didn't get any requirements for the signature
-
deep7 wrote:
Can anyone please tell me how to get prompt window in the center of screen?
You mean Popup window ? In position you are getting right now ? Did you give the top and left position while opening popup window? By default it should be in center.
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
No, its not window.open ...its just a prompt window. I dont have any options for setting it in center like how i can do when normal window.open...for this popup window, we can set it to center, but what about prompt? document.getElementbyID('hiddencomments') = prompt("Please enter comments here",""); please do help me here. Thanks Deepa