We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

iTony on 11/07/06


Tagged

javascript up pop


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

vali29


popup an element from one click


Published in: JavaScript 


This I will use for popping up the login and profile info

  1. function popup() {
  2. var id = document.getElementById(ID);
  3. var screenW = document.body.clientWidth;
  4. id.style.left = (screenW - 850)/2 + 515 + "px";
  5. if (id.style.display == "none") {
  6. id.style.display = "block";
  7. }
  8. else {
  9. id.style.display = "none";
  10. }
  11. }

Report this snippet 

You need to login to post a comment.