grungefreak Posted September 5, 2009 Share Posted September 5, 2009 I have a link on my site to log in. I want a new window to pop up when the user clicks this. This new window will simply hold 2 textfields - username and password - is this a Javascript thing (prompt) or a CSS event. If this is Javascript, then is it possible to style this pop up with css? GF Link to comment https://forums.phpfreaks.com/topic/173234-log-in-window/ Share on other sites More sharing options...
saltedm8 Posted September 6, 2009 Share Posted September 6, 2009 sounds like you want javascript.. opening a new window in html is easy, you just use target_blank after your link, but since you want it to open a certain size, thats where javascript is needed Link to comment https://forums.phpfreaks.com/topic/173234-log-in-window/#findComment-913402 Share on other sites More sharing options...
haku Posted September 6, 2009 Share Posted September 6, 2009 Yes, it's possible to style the CSS. Just load the CSS for the popup window in page load. Then give the popup the class name, you want and it will automatically take those styles. Link to comment https://forums.phpfreaks.com/topic/173234-log-in-window/#findComment-913415 Share on other sites More sharing options...
Jnerocorp Posted September 6, 2009 Share Posted September 6, 2009 If this is what you are looking for: http://jnerocorp.com/tests/test7.php then use the following codes. Step 1: Add this code to the page where the Login button will be: <a href="javascript:void(0)"onclick="window.open('http://www.JneroCorp.com/tests/login.php','linkname','height=150, width=300,scrollbars=no')">Login</a> Step 2 Create a Page called "login.php" Add this code to it: <form action="#" method="post"> Username: <input type="text" name="username"><br> Password: <input type="password" name="password"<br> <input type="submit" value="login"> </form> Hope this helps Link to comment https://forums.phpfreaks.com/topic/173234-log-in-window/#findComment-913552 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.