I am new one for jquery , i have tow content pages
1) on this page i have placed a grid showing all products
2) on this page i have written logic for insert / add product and i placed all input fields
Both pages working fine,
my problem is that i want to open second page in Lighbox on the first page button click ?
Is it possible to open content page inside the lightbox? and one thing more i dont want did such type of logic like place a div on page one and its visibility is false but user clicks on button to open lightbox then i open such .........
i have some input fields on Test.aspx page when record is successfully stored in database than light box is closed how can i close it and i did not works on firefox
hyder92
Member
278 Points
211 Posts
Open new form in Jquery Light box ASP.net
Jan 21, 2012 08:57 AM|LINK
Hi All,
I am new one for jquery , i have tow content pages
1) on this page i have placed a grid showing all products
2) on this page i have written logic for insert / add product and i placed all input fields
Both pages working fine,
my problem is that i want to open second page in Lighbox on the first page button click ?
Is it possible to open content page inside the lightbox? and one thing more i dont want did such type of logic like place a div on page one and its visibility is false but user clicks on button to open lightbox then i open such .........
A1ien51
All-Star
29935 Points
5821 Posts
Re: Open new form in Jquery Light box ASP.net
Jan 21, 2012 12:40 PM|LINK
Easy solution is to stick an iframe into the lightbox with the page.
Eric
asteranup
All-Star
30184 Points
4906 Posts
Re: Open new form in Jquery Light box ASP.net
Jan 21, 2012 02:21 PM|LINK
Hi,
You can do this using fancybox very easily. Check the post below-
http://forums.asp.net/p/1758046/4776901.aspx/1?Re+light+box+javascript
In the post the popup is done using an inline div. You can use iFrame for this purpose.
You can find the detail of fancybox in the following link. Check the use of iframe there-
http://fancybox.net/#various5
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
hyder92
Member
278 Points
211 Posts
Re: Open new form in Jquery Light box ASP.net
Jan 22, 2012 03:58 PM|LINK
thanks for reply can you please send me a sample code where i get an idea
asteranup
All-Star
30184 Points
4906 Posts
Re: Open new form in Jquery Light box ASP.net
Jan 23, 2012 04:48 AM|LINK
Hi,
Its really simple. I have given you the code. But still check this-
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> <script src="http://fancybox.net/js/fancybox-1.3.4/jquery.fancybox-1.3.4.js" type="text/javascript"></script> <link href="http://fancybox.net/js/fancybox-1.3.4/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> jQuery(document).ready(function() { jQuery("a.inline1").fancybox({ 'transitionIn': 'elastic', 'transitionOut': 'none', 'type': 'iframe' }); }); </script> </head> <body> <a href="html.html" class="inline1" >click here</a> </body> </html>Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
hyder92
Member
278 Points
211 Posts
Re: Open new form in Jquery Light box ASP.net
Jan 31, 2012 04:31 AM|LINK
thanks it works
but how can i hide this light box or close,
i have some input fields on Test.aspx page when record is successfully stored in database than light box is closed how can i close it and i did not works on firefox
asteranup
All-Star
30184 Points
4906 Posts
Re: Open new form in Jquery Light box ASP.net
Jan 31, 2012 06:17 AM|LINK
Hi,
If you are saving the data using ajax then Just call $.fancybox.close() on your onClick event or you save button.
If you are using normal asp.net button for saving the data then it should get saved autometically.
If you are using normal asp.net button with update panel for saving data. Then from the buttonclick using registerstartupscript close the popup.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
hyder92
Member
278 Points
211 Posts
Re: Open new form in Jquery Light box ASP.net
Feb 01, 2012 03:54 AM|LINK
thanks for reply,
It did not open on firefox browser it works only in IE browser
asteranup
All-Star
30184 Points
4906 Posts
Re: Open new form in Jquery Light box ASP.net
Feb 01, 2012 03:55 AM|LINK
hi,
Check properly there can be someother issues. Its working in firefox.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
hyder92
Member
278 Points
211 Posts
Re: Open new form in Jquery Light box ASP.net
Feb 02, 2012 03:33 AM|LINK
Hi,
I have checked it but its not working on fire fox i dont know what is the issue please suggest me what should i do