Click here to Skip to main content
16,020,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm working on a vb.net project.
MS Visual Studio 2008
Framework: 3.5
DB: MSSQL SERVER 2005

I need to show an image in lightbox using javascript on home(default) page of the website. For ex: when an user hit to the website then firstly automatically show him/her a lightbox which will have an image on page load of home(default) page of the website.

Now, I have two files, one is "jquery.lightbox.min.js" and other is "jquery.lightbox.css".

Image size: width X height = 400 X 550 in JPG format

Under <head> tag:
<script type="text/javascript" src="js/lightbox/jquery.lightbox.min.js"></script>

<link rel="stylesheet" type="text/css" href="js/lightbox/themes/default/jquery.lightbox.css" />


Now, please suggest me, how would i do further process?
Posted
Updated 20-Jun-16 23:46pm
v3
Comments
Where have you called genericPopup?
Tarun Mittal Delhi 20-Jun-16 3:08am    
under script tag
Karthik_Mahalingam 20-Jun-16 6:37am    
do you want to show the popup on page load or on some button click ?
Tarun Mittal Delhi 20-Jun-16 6:38am    
on page load
Karthik_Mahalingam 20-Jun-16 6:38am    
are you using jquery?

1 solution

Add this code in the Default.aspx page where you want to show the popup on load.

JavaScript
<script>
       $(function () {
           var wind = genericPopup('YourPopupPage.aspx', 500, 500, 'yes');
       });
   </script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900