Solved

How cna I make a lightbox display onload?

Posted on 2009-05-06
2
1,484 Views
Last Modified: 2012-05-06
I have tried to do this in the past and have never had luck.  There are lots of lightbox scripts out there on the web.  They all do a wonderful job of opening an image when a link is clicked.  I've never been able to make one do it onload.  

<body onload="display_the_image_in_a_lightbox_fashion">

I don't have any code to share at the moment.  I'm just throwing this out there to see if anyone has a lightbox-style thing that will display an image onload.  It would be an awesome help.
0
Comment
Question by:mrcoulson
  • 2
2 Comments
 

Author Comment

by:mrcoulson
ID: 24316490
Here we go.

http://www.co.frederick.va.us/gis/default_WORKING.aspx

Click the ### at the top.  What if I want to make the image load as a lightbox without having to click the ### at the top?
<!-- From the <body> tag to the lightbox link: -->
 

<body>

<form id="gisForm" runat="server">

  <div id="contentDiv">

    <!-- #INCLUDE FILE="/includes/small_masthead.asp" -->

    <div id="leftNavBox-contentPages">

		<!-- #INCLUDE FILE="/gis/includes/gisMenus.asp" -->

	</div>

    <img src="/dry_dock/images/seal-lines.jpg" border="0" style="position:absolute;bottom:2px;z-index:500;" />

	<div id="textHolder">

    <a rel="lightbox-myGroup" href="images/offline.gif" title=" " >###</a>

Open in new window

0
 

Accepted Solution

by:
mrcoulson earned 0 total points
ID: 24317772
Almost too easy.
<script type="text/javascript" language="javascript">

<!--

  $(document).ready(function(){

    $("#offlineAlert").click();

  });

//-->

</script>

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now