I am trying to get a jsp form into fancybox my site functions ok so i know most of my configurations are correct. I also did a sample test with an image and it worked great however with a form i am having problems. Under is the code:
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
<script type="text/javascript">
<%@ include file="../js/lightbox/jquery.fancybox.pack.js"%>
</script>
<style>
<%@ include file="../js/lightbox/jquery.fancybox.css" %>
</style>
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox();
});
</script>
<title><fmt:message key="title"/></title>
</head>
<body>
<h1><fmt:message key="heading"/></h1>
<p><fmt:message key="greeting"/></p>
<a href="<c:url value="login.htm"/>">Login</a></br>
<a href="<c:url value="officer_registration.htm"/>">Register</a></br>
<a class="fancybox" href="officer_registration.htm">Light Box Registration</a></br>
<a class="fancybox" href="http://en.gtwallpaper.com/fondecran/chiens/chiens_01.jpg" >dog</a>
</body>
</html>
Add data-fancybox-type=”iframe” to the link,
this will put an iframe within the fancybox displaying the href you passed through.