掲示板
aui-tabs
hi all,
I've created 3 tabs in the first 1 of them I wanna put a Form (a box with some content)
this is javascript code for the tabs:
AUI().ready('aui-tabs', function(A) {
var tabs = new A.TabView(
{
boundingBox: '#demo', items:
[
{
content: 'This my content 1' , label: 'Tab 1' },
{ content: 'This my content 2', label: 'Tab 2' },
{ content: 'This my content 3', label: 'Tab 3' }
] } ) .render(); });
now instead of 'This my content 1' I wanna put a box with some content (Form), here is the javascript code for that form
AUI().ready('aui-form-base', function(A) { var form = new A.Form( { contentBox: '#myForm' } ) .render(); });
now how can I integrate the code of the Form in the code of the tabs to get that Form inside of the first Tab. I am using liferay 6.1
thanks for ur help.
I've created 3 tabs in the first 1 of them I wanna put a Form (a box with some content)
this is javascript code for the tabs:
AUI().ready('aui-tabs', function(A) {
var tabs = new A.TabView(
{
boundingBox: '#demo', items:
[
{
content: 'This my content 1' , label: 'Tab 1' },
{ content: 'This my content 2', label: 'Tab 2' },
{ content: 'This my content 3', label: 'Tab 3' }
] } ) .render(); });
now instead of 'This my content 1' I wanna put a box with some content (Form), here is the javascript code for that form
AUI().ready('aui-form-base', function(A) { var form = new A.Form( { contentBox: '#myForm' } ) .render(); });
now how can I integrate the code of the Form in the code of the tabs to get that Form inside of the first Tab. I am using liferay 6.1
thanks for ur help.
amani kh:
hi all,
I've created 3 tabs in the first 1 of them I wanna put a Form (a box with some content)
this is javascript code for the tabs:
AUI().ready('aui-tabs', function(A) {
var tabs = new A.TabView(
{
boundingBox: '#demo', items:
[
{
content: 'This my content 1' , label: 'Tab 1' },
{ content: 'This my content 2', label: 'Tab 2' },
{ content: 'This my content 3', label: 'Tab 3' }
] } ) .render(); });
now instead of 'This my content 1' I wanna put a box with some content (Form), here is the javascript code for that form
AUI().ready('aui-form-base', function(A) { var form = new A.Form( { contentBox: '#myForm' } ) .render(); });
now how can I integrate the code of the Form in the code of the tabs to get that Form inside of the first Tab. I am using liferay 6.1
thanks for ur help.
Please check this link.
Here it was mentioned how to create the Tabs with different sections but using liferay-ui:tabs.
Thanks & Regards,
Amit Doshi
Hi Amith and Archana,
Check the below sample code i hope this will help you to achieve your requirement.
Check the below sample code i hope this will help you to achieve your requirement.
<h2>From markup</h2>
<div id="markupTabs">
<ul class="aui-tabview-list aui-widget-hd" id="test">
<li class="aui-tab"><a class="aui-tab-label" href="javascript:;">Hello A</a></li>
<li class="aui-tab"><a class="aui-tab-label" href="javascript:;">Hello B</a></li>
<li class="aui-tab"><a class="aui-tab-label" href="javascript:;">Hello C</a></li>
</ul>
<div class="aui-tabview-content aui-widget-bd" id="testContent">
<div class="aui-tabview-content-item">
<h3>1. New tab content</h3><br>
Tab 1 body content
</div>
<div class="aui-tabview-content-item">
<h3>2. New tab content</h3><br>
Tab 2 body content
</div>
<div class="aui-tabview-content-item">
<h3>3. New tab content</h3><br>
Tab 3 body content
</div>
</div>
</div>
<script type="text/javascript" charset="utf-8">
AUI().ready(
'aui-tabs', 'substitute',
function(A) {
var tabs1 = new A.TabView(
{
boundingBox: '#markupTabs',
listNode: '#test',
contentNode: '#testContent'
}
);
tabs1.render();
}
);
</script>