Don E Posted October 21, 2011 Share Posted October 21, 2011 Hello everyone, I'm not entirely sure, I'm assuming the following has to do with JavaScript but I was wondering for example when you visit this board and you click on the Sign On link, a pop box up appears for you to put in your username and password, and the background dims to a dark slight tint. Is this done with JavaScript? Is the popup box an actual new browser window? Is it basically a new browser window with a new document(document.write) inside that window? It looks like it would be something like an alert(), prompt() or confirm(). Thanks in advance! Link to comment Share on other sites More sharing options...
Ingolme Posted October 21, 2011 Share Posted October 21, 2011 It's a fake window. It's just a <div> element with style made to look like one. Javascript can set the visibility and position of the box. Link to comment Share on other sites More sharing options...
Don E Posted October 21, 2011 Author Share Posted October 21, 2011 I see. Is the dimming of the background done with JavaScript/CSS too? Link to comment Share on other sites More sharing options...
Ingolme Posted October 22, 2011 Share Posted October 22, 2011 A semi-transparent box is placed over the entire window. It uses the CSS opacity to be transparent (Internet Explorer uses the "filter" property instead). Ontop of it goes the login box. Link to comment Share on other sites More sharing options...
Don E Posted October 22, 2011 Author Share Posted October 22, 2011 Awesome, thanks Fox. What about the quick greenish "loading" bar we see pop up before the popup sign-in window(div) appears? Is that basically a image (.gif?)inside a div showing up for a second or two before the popup sign-in window? Link to comment Share on other sites More sharing options...
TheGallery Posted October 22, 2011 Share Posted October 22, 2011 I think that's a preloader, it shows up while loading the data Link to comment Share on other sites More sharing options...
Ingolme Posted October 22, 2011 Share Posted October 22, 2011 I'm usually always logged in so I can't remember exactly how the login window is. Usually, web applications will make an animated gif image appear while loading data using AJAX and then clear the gif when the data is received. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.