Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-31-2011, 06:32 PM   PM User | #1
anarchos78
New to the CF scene

 
Join Date: Oct 2011
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
anarchos78 is an unknown quantity at this point
“jQuery EasyUI” tab panel

Hello,
I am new in the whole JQuery/Javascript stuff. I have a question concerning
“jQuery EasyUI” tab panel:
I don’t want to load it into a iframe. I want to load it into the tab panel body. How can I do that?
The code I use is:

<!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=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
function addTab(title, url){
if ($('#tt').tabs('exists', title)){
$('#tt').tabs('select', title);
} else {
var content = '<iframe frameborder="0" src="'+url+'" style="width:100%; height:100%;" ></iframe>';
// add a new tab panel
$('#tt').tabs('add',{
title:title,
content:content,
closable:true

});

}
}
</script>
</head>

<body>

<a href="#" class="easyui-linkbutton" onclick="addTab('demo','demo.html')">demo</a>
<a href="#" class="easyui-linkbutton" onclick="addTab('demo1','demo1.html')">demo1</a>

<div id="tt" class="easyui-tabs" style="width:600px; margin:0px auto;">
<div title="Tab1" closable="true" style="padding:20px;display:block;">

</div>
<div title="Tab2" closable="true" style="padding:20px;display:block;">
</div>

<div title="Tab3" closable="true" style="padding:20px;display:block;">
</div>
</div>


</body>
</html>
anarchos78 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:44 AM.


Advertisement
Log in to turn off these ads.