Viewing PDF using FancyBox

1,467 views
Skip to first unread message

AjitGoel

unread,
Jul 31, 2009, 6:02:30 PM7/31/09
to fancybox
Hi;
I am trying to use FancyBox to display a pdf document using the
something that has been suggested here:
http://www.1011web.com/blog/post/2009/04/23/Using-jQuery-and-FancyBox-to-show-PDF-documents.aspx
but the code does not work. Can someone please advise what I might be
doing wrong??

Here is my aspx page code:

<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Main</title>
<script type="text/javascript" src="JQuery/jquery.js"></script>
<script type="text/javascript" src="JQuery/FancyBox/
jquery.fancybox-1.2.1.pack.js"></script>
<script type="text/javascript" src="JQuery/FancyBox/jquery.easing.
1.3.js"></script>

<link rel="stylesheet" href="JQuery/FancyBox/jquery.fancybox.css"
type="text/css" media="screen">
<script language=javascript>
$(document).ready(function()
{
$(".fancyFrame").fancybox({'frameWidth' : 700,
'frameHeight': 600, 'overlayShow': true, 'hideOnContentClick':
false});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<a class="fancyFrame" Title="Quick Tips" href="188108.bmp">Quick
Tips</a>
<a class="fancyFrame" Title="Quick Tips" href="ToRead.pdf">Quick
Tips</a>
<a class="iframe" href="ajit.pdf" title="Quick Tips">Quick Tips</
a>

</form>
</body>
</html>

Reply all
Reply to author
Forward
0 new messages