Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Promp box in the center of screen

Promp box in the center of screen

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
11 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deep7
    wrote on last edited by
    #1

    Hi, Can anyone please tell me how to get prompt window in the center of screen? Thanks Deepa

    A B T 3 Replies Last reply
    0
    • D deep7

      Hi, Can anyone please tell me how to get prompt window in the center of screen? Thanks Deepa

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      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

      D 1 Reply Last reply
      0
      • D deep7

        Hi, Can anyone please tell me how to get prompt window in the center of screen? Thanks Deepa

        B Offline
        B Offline
        Blue_Boy
        wrote on last edited by
        #3

        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

        A 1 Reply Last reply
        0
        • B Blue_Boy

          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

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          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

          B 1 Reply Last reply
          0
          • A Abhijit Jana

            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

            B Offline
            B Offline
            Blue_Boy
            wrote on last edited by
            #5

            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

            A V 2 Replies Last reply
            0
            • B Blue_Boy

              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

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #6

              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

              B 1 Reply Last reply
              0
              • A Abhijit Jana

                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

                B Offline
                B Offline
                Blue_Boy
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • B Blue_Boy

                  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

                  V Offline
                  V Offline
                  Viral Upadhyay
                  wrote on last edited by
                  #8

                  great :thumbsup:

                  Viral My Site Tips & Tracks

                  B 1 Reply Last reply
                  0
                  • V Viral Upadhyay

                    great :thumbsup:

                    Viral My Site Tips & Tracks

                    B Offline
                    B Offline
                    Blue_Boy
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • D deep7

                      Hi, Can anyone please tell me how to get prompt window in the center of screen? Thanks Deepa

                      T Offline
                      T Offline
                      ToddHileHoffer
                      wrote on last edited by
                      #10

                      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

                      1 Reply Last reply
                      0
                      • A Abhijit Jana

                        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

                        D Offline
                        D Offline
                        deep7
                        wrote on last edited by
                        #11

                        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

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups