Solved

Change the JQuery Fancybox width

Posted on 2011-09-13
1
774 Views
Last Modified: 2012-06-27
had a popup fancybox but couldnt adjust the width of the fancybox.
mainpage 
-------------- 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server"> 
<link rel="Stylesheet" href="../../Styles/JQuery/jquery.fancybox-1.3.4.css"/> 
<script type="text/javascript" src="../../Styles/JQuery/jquery-1.4.3.min.js"></script> 
<script type="text/javascript" src="../../Styles/JQuery/jquery.fancybox-1.3.4.pack.js"></script> 
    <script> 
 
        function ShowContent(_url)  
        { 
            $.fancybox( 
                                _url, 
                                { 
                                    type: 'iframe', 
                                    showCloseButton: true, 
                                    opacity: true, 
                                    overlayColor: '#000', 
                    overlayOpacity: 0, 
                                    transitionIn: 'none', 
                                    transitionOut: 'none', 
                                    enableEscapeButton: true 
                   
                                } 
                        ); 
        } 
    </script> 
 
 
 
    <style type="text/css"> 
        .style5 
        { 
            font-family : Arial; 
            font-size : 12; 
            height: 19px; 
        } 
        .style6 
        { 
            height: 19px; 
        } 
    </style> 
 
 
 
</asp:Content> 
 
 
popup page 
----------------- 
 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
       <style> 
        * 
        { 
            font-family:Tahoma, Arial; 
            font-size:11px; 
             
        } 
        h1{font-size:15px; font-weight:bold;} 
        p{color:#333;} 
    </style> 
    <link type="text/css" rel="Stylesheet" href="../../Styles/JQuery/jquery.fancybox-1.3.4.css" /> 
 
</head> 
<body> 
    <form id="form1" runat="server"> 
   <div> 
      <asp:GridView AutoGenerateColumns="false" ID="gvPopup" runat="server" Width="100%" onrowdatabound="gvPopup_RowDataBound"> 
        <Columns> 
            <asp:BoundField DataField="actualtime" HeaderText="Actual Time" HeaderStyle-BackColor="LightGray" /> 
            <asp:BoundField DataField="lessonno" HeaderText="Lesson No" ItemStyle-Width="100px" HeaderStyle-BackColor="LightGray" /> 
            <asp:BoundField DataField="modulename" HeaderText="Module Name" ItemStyle-Width="100px" HeaderStyle-BackColor="LightGray" /> 
            <asp:BoundField DataField="classtype" HeaderText="Class Type" ItemStyle-Width="100px" HeaderStyle-BackColor="LightGray" /> 
            <asp:BoundField DataField="attendancestatus" HeaderText="Attendance Status" ItemStyle-Width="100px" HeaderStyle-BackColor="LightGray" /> 
            <asp:BoundField DataField="lateduration" HeaderText="Late Duration" DataFormatString="{0:t}" ItemStyle-Width="100px" HeaderStyle-BackColor="LightGray" /> 
        </Columns> 
      </asp:GridView> 
    </div> 
    </form> 
</body> 
</html>

Open in new window

0
Comment
Question by:doramail05
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 36533702
check the api : http://fancybox.net/api

we set the width :
<script> 
 
        function ShowContent(_url)  
        { 
            $.fancybox( 
                                _url, 
                                { 
width:1024,
                                    type: 'iframe', 
                                    showCloseButton: true, 
                                    opacity: true, 
                                    overlayColor: '#000', 
                    overlayOpacity: 0, 
                                    transitionIn: 'none', 
                                    transitionOut: 'none', 
                                    enableEscapeButton: true 
                   
                                } 
                        ); 
        } 
    </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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

708 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

15 Experts available now in Live!

Get 1:1 Help Now