Get KoolPHP UI with 30% OFF!

Tabs inside html table

Abilio Magalhaes
Dear Sirs,
Our project uses html tables.
We would like to put the tabs control inside a <td> element and submit the form when pressing one tab, so we can generate the tab content.
Can you help?
Kind regards
Posted Dec 7, 2015 Kool
David
Hi Abilio,
To put the tabs inside a <td> element, I think you could try echo $kooltab->render() inside that element. To submit your form when pressing one tab, you could try register the 'OnSelect' event, find your form with javascript and submit it. Here's an example to register KoolTabs client events:
KoolTabs client events
Example code:
$kooltab = new KoolTabs("kts");
...
<script type="text/javascript">		
		kts.registerEvent("OnSelect",function(sender,arg){
			writelog("The <b>"+arg.TabId+"</b> tab is selected!");
		});
				
		function writelog(_text)
		{
			var _eventlog = document.getElementById("eventlog");
			_eventlog.innerHTML +="<div style='white-space:nowrap;'>"+_text+"</div>";
			_eventlog.scrollTop = 9999;
		}
</script>

Please let us know if there's any difficulty achieving your task. Thanks!
Posted Dec 9, 2015 Kool