SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 33
  1. #1
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    opening web app in a new window after login. how?

    Hey all. i m working on a web app. i want after login button the web app is opened in a popup (1280, 800). i never used JS before so i have no idea how to do it but i need help with it. wht shld i do?
    All those who wander aren't lost.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thanks dan for the link. however i need to know how can i implement it when someone click submit button coz that when i want it. after someone click submit.
    All those who wander aren't lost.

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Don't you need to process the login form before you can pop up the application, not just pop it up upon clicking the submit button? Or did you want the login details to get sent to the page in the window you open?

  5. #5
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    the later one i want.
    All those who wander aren't lost.

  6. #6
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i want opup to be created after the password/login has been authorized
    All those who wander aren't lost.

  7. #7
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    anyone help me!!
    All those who wander aren't lost.

  8. #8
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Your posts are contradictory. Formulate a very clear problem statement and maybe someone will give it a try.

  9. #9
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i just want very simple JS. i want that when a person click on a button the whole CMS is open in a new window which has a with of 1280 * 800. thats it
    All those who wander aren't lost.

  10. #10
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <input type="button" value="Open Window" onclick="window.open('http://www.example.com','popup','width=1280,height=800')" />

  11. #11
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i am unable to pop it up. it opens it the same window. here is the code
    Code HTML4Strict:
    <body onLoad="checkLogin();">
                                <table width="100" align="center">
                                <tr>
                                <td>
                                    <div id="login">
                                            <div id="loginbox">
                                            <form action="login_proc.php" method="post" name="form1"id="form1">
                                              <table width="400" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                  <td width="50">Username</td>
                                                  <td width="50"><input name="txtUsername" type="text"id="txtUsername" style="margin:5px;"/></td>
                                                </tr>
                                                <tr>
                                                  <td>Password</td>
                                                  <td><input name="txtPassword" type="password"id="txtPassword" style="margin:5px;"/></td>
                                                </tr>
                                                <tr>
                                                  <td colspan="2" align="left"><table width="400" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                      <td width="140">&nbsp;</td>
                                                      <td><table width="70" border="0" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                          <td height="35" align="center"><input class="loginbutton" value="Login" type="submit"></td>
                                                        </tr>
                                                      </table></td>
                                                    </tr>
                                                  </table></td>
                                                </tr>
                                              </table>
                                              </form>
                                            </div>
     
     
     
     
                    </div>          
    </td>
    </tr>
    </table>
    </body>
    thats the code without the popup JS/ wht shld i do?
    All those who wander aren't lost.

  12. #12
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    hey folks, i have created this function, but there r issues.

    • In IE the width and height isn't the what i gave it.
    • In FF i think JS attributes like statusbar=no etc is ignored how do i make it implement of FF too?

    Code JavaScript:
    <script type="text/javascript">
    function Resize()
    {
        window.open("home.php","_blank","toolbar=no","location=yes","directories=no","status=no","menubar=no","scrollbars=no","resizeable=no","copyhistory=yes, width=1280, height=800");
    }
    </script>
    All those who wander aren't lost.

  13. #13
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    window.open only takes 3 parameters

    the 3rd parameter is a list

    It should look like "toolbar=no,location=yes" not "toolbar=no","location=yes"

  14. #14
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    what about the IE issue. why doesn't it follow the width and height i gave it?
    All those who wander aren't lost.

  15. #15
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Perhaps it will help if you show us the width and height?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  16. #16
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    perhaps It Will Help If You Show Us The Width And Height?
    1280 * 800
    All those who wander aren't lost.

  17. #17
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by ammark View Post
    1280 * 800
    I should have been clearer.

    It will help if you show us the scripting code that you are using to open the window at a certain size.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  18. #18
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    window.open only takes 3 parameters
    It actually takes 4 parameters. The fourth one has to do with the history when reusing existing windows and is only ever true or false. Unless a window with the name in the second parameter already exists the fourth parameter is ignored (the same as the third parameter is ignored if it does exist - and quite often even if it doesn't).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  19. #19
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ammark View Post
    1280 * 800
    those values are optional. The browser doesn't have to follow them if the window already exists or you are opening in a new tab or if the size is too big to fit on the screen or if it is below the minimum size or if the browser owner tells the browser to ignore the size.

    It might actually be following the size you specified and you forgot to allow for the size of the menubar, toolbars, statusbar, addressbar etc that the new window iis displaying (some of which are mandatory in modern browsers).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  20. #20
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here is the code which i m using. about parameters i haven't started working on that as i looked in w3school JS.
    All those who wander aren't lost.

  21. #21
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by ammark View Post
    Here is the code which i m using.
    Reference: the non-working code
    Code javascript:
    window.open("home.php","_blank","toolbar=no","location=yes","directories=no","status=no","menubar=no","scrollbars=no","resizeable=no","copyhistory=yes, width=1280, height=800");

    Thanks.

    All of the parameters after "_blank" need to be contained within the same set of quotes. It's also important to ensure that the third set of parameters have no spaces between the commas.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  22. #22
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    All of the parameters after "_blank" need to be contained within the same set of quotes, with no spaces between the commas.
    do u think that is the issue?
    All those who wander aren't lost.

  23. #23
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by ammark View Post
    do u think that is the issue?
    Yes. The list of window features must be specified as one string.
    See: https://developer.mozilla.org/En/DOM/Window.open
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  24. #24
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ammark View Post
    do u think that is the issue?
    Yes, this is what I was telling you 10 posts ago

  25. #25
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The issue i get was in IE, i don't know to ask this or not as my dev machine lcd is gone for repair. but will it fix in IE?
    All those who wander aren't lost.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •