Solved

fancybox object required error

Posted on 2011-03-01
3
1,145 Views
Last Modified: 2012-05-11
while requesting to use popup by assigning to ahref id="inline" . having object require error pointing to line below :


<script>

        $("a#inline").fancybox({
            'hideOnContentClick': true
        });

    </script>
aspx
----
 <script type="text/javascript" src="Images/Script/jquery-1.4.3.min.js"></script>
<script>

        $("a#inline").fancybox({
            'hideOnContentClick': true
        });

    </script>

code-behind
-----------
litMedia.Text = "<li><a id='inline' href=""popup.aspx?strapp=" & NewDS1.Tables(0).Rows(i)("ID") & """>" & NewDS1.Tables(0).Rows(i)("Subject").ToString() & "</a></li>"

popup
-----
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
        <tr>
            <td><asp:Label id="lbl01" runat="server" /></td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>

popup.aspx.cs
-------------
Partial Public Class popup
    Inherits System.Web.UI.Page

    Dim objBOMedia As New BOMedia

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim strID As String = DirectCast(Request.QueryString("strapp"), String)

        Dim NewDS1 As New DataSet

        NewDS1 = objBOMedia.getMediaByID(strID)

        If NewDS1.Tables(0).Rows.Count > 0 Then

            lbl01.Text = NewDS1.Tables(0).Rows(0)("MediaContent").ToString()

        End If

    End Sub

End Class

Open in new window

jquery-1.4.3.min.js
style.css
fancy-close.png
0
Comment
Question by:doramail05
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Expert Comment

by:R-Byter
ID: 35015333
Do you have jquery.fancybox-1.3.4.pack.js referenced?
You also need to enclose fancybox code for a#inline in document.ready:

<script>
$(document).ready(function() {
        $("a#inline").fancybox({
            'hideOnContentClick': true
        });
});
</script>

Open in new window


Regards
0
 
LVL 1

Accepted Solution

by:
doramail05 earned 0 total points
ID: 35023719
solved already.
<script type="text/javascript">
		$(document).ready(function() {
			
			

			$(".various1").fancybox({
			'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
				
			});

			
		});
    </script>

Open in new window

0
 
LVL 1

Author Closing Comment

by:doramail05
ID: 35067750
found solutions
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
asp.net, radiobuttonlist, c# 3 69
Expanding/Collapsing Tree on SharePoint List 29 62
PDF Turn Look 7 34
What is GIS method of Geometry data type? 6 33
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
Suggested Courses

732 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