I am Using 2 Horizontle Frames. In Top Frame I used Jquery Tabs. I expect Whenever I click on The tab , the result Page should open in the below Frame. But It Is not working. Can anybody help me plz. Do Jquery Tabs Supports Frames?
views:
171answers:
1
A:
index.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<frameset rows="80,*" frameborder="no" border="0" framespacing="0">
<frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frame src="cont.html" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>
<noframes><body>
</body>
</noframes></html>
top.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
<script language="JavaScript">
$(function(){
$("#test").click(function(){
alert( $(window.parent.document.frames["mainFrame"].document).find("body").html() );
$(window.parent.document.frames["mainFrame"].document).find("body").html("<div>this is a test</div>");
alert( $(window.parent.document.frames["mainFrame"].document).find("body").html() );
});
});
</script>
</head>
<body>
<button id="test">test</button>
</body>
</html>
cont.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div>empty</div>
</body>
</html>
andres descalzo
2009-10-20 13:28:41