Jump to content

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/112219-invoke-a-hyperlink/#findComment-576157
Share on other sites

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!

Link to comment
https://forums.phpfreaks.com/topic/112219-invoke-a-hyperlink/#findComment-577344
Share on other sites

  • 6 months later...

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

Link to comment
https://forums.phpfreaks.com/topic/112219-invoke-a-hyperlink/#findComment-743425
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.