Orionsbelter Posted January 18, 2009 Share Posted January 18, 2009 ok, i have a bit of coding that'll open a light box when onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'" is click how ever i want document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block' to open when the page is loaded how can i do it? Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted January 18, 2009 Share Posted January 18, 2009 Add this: <script type="text/javascript"> window.onload = function() { document.getElementById('light').style.display='block'; document.getElementById('fade').style.display='block'; }; </script> Quote Link to comment Share on other sites More sharing options...
Orionsbelter Posted January 18, 2009 Author Share Posted January 18, 2009 Thanks will try it now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.