busillis Posted June 27, 2008 Share Posted June 27, 2008 Is it possible to invoke a link when a page loads? I'm trying to use lightwindow* as a notification window. [http://www.stickmanlabs.com/lightwindow/#howtouse]* Quote Link to comment Share on other sites More sharing options...
haku Posted June 27, 2008 Share Posted June 27, 2008 What do you mean 'invoke a link'? Quote Link to comment Share on other sites More sharing options...
busillis Posted June 27, 2008 Author Share Posted June 27, 2008 Well, when I click a link this particular window (lightwindow) appears and displays some content, similar to that of a normal OS dialog. I want to display this lightwindow without clicking a link, when the page loads...? Hope this helps :-S Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted June 27, 2008 Share Posted June 27, 2008 Well, when I click a link this particular window (lightwindow) appears and displays some content, similar to that of a normal OS dialog. I want to display this lightwindow without clicking a link, when the page loads...? Hope this helps :-S <script type="text/javascript"> window.onload = function() { //code to display the window } </script> Quote Link to comment Share on other sites More sharing options...
busillis Posted June 29, 2008 Author Share Posted June 29, 2008 Sorry to be a pain, still cannot get this to work though ??? Is there any more information I can provide? I'm racking my brains, but everythign I try doesn't seem to work. I'm sure i'm doing something silly Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted June 29, 2008 Share Posted June 29, 2008 Show us how a window such as this is typically created. Quote Link to comment Share on other sites More sharing options...
busillis Posted June 29, 2008 Author Share Posted June 29, 2008 This does now work in FireFox 3, but IE7 doesn't do anything. Is there some tweak to make IE also show it on load? <script type="text/javascript"> window.onload = function() { myLightWindow = new lightwindow(); myLightWindow.activateWindow ({ href: "uploadform.php", title: 'Title goes here', params:"lightwindow_type=external,lightwindow_width=250,lightwindow_height=150"} ); } </script> Thanks for all your help! Quote Link to comment Share on other sites More sharing options...
busillis Posted June 29, 2008 Author Share Posted June 29, 2008 I changed the URL to "http://www.google.com" and it now works in IE7, but doesn't seem to work for local file :S Quote Link to comment Share on other sites More sharing options...
busillis Posted June 29, 2008 Author Share Posted June 29, 2008 Never mind me, now it is :-S Think im losing it.... lol Quote Link to comment Share on other sites More sharing options...
bruckerrlb Posted January 22, 2009 Share Posted January 22, 2009 I'm trying to do the same thing here, but it is not working, basically what I"m trying to do is call a function on page load, just like the guy who posted before me, I put the code <script type="text/javascript"> window.onload = function() { myLightWindow = new lightwindow(); myLightWindow.activateWindow ({ href: "http://www.google.com", title: 'Title goes here', params:"lightwindow_type=external,lightwindow_width=250,lightwindow_height=150"} ); } </script> right about the </head> tag, but nothing. Is there something I"m doing wrong? The script I"m using is http://stickmanlabs.com/lightwindow/#demos Normally what happens, is a user clicks on a link and a light window is invoked, just like light box. The way you go about doing this is in the example below <a href="casestudyrpo.html" class="lightwindow page-options">CS 1</a> But I"m not sure how I can translate this so that this happens automatically when a page opens. Does anyone have any advice? Thanks in advance 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.