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?
| SitePoint Sponsor |


17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more.


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?
17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more.


Your posts are contradictory. Formulate a very clear problem statement and maybe someone will give it a try.
17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more.


Code:<input type="button" value="Open Window" onclick="window.open('http://www.example.com','popup','width=1280,height=800')" />
17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more.
i am unable to pop it up. it opens it the same window.here is the code
thats the code without the popup JS/ wht shld i do?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"> </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>
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>


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"
17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more.


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


Programming Group Advisor
Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
Car is to Carpet as Java is to JavaScript

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="^$">

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="^$">
Here is the code which i m using. about parameters i haven't started working on that as i looked in w3school JS.


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


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


17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more.
Bookmarks