How tabs work in php to load another php page
I am new to javascript but my proble is that I want tabs in my php I try but i did not work.
my code
<style>
#myTabs {width: 55%}
</style>
<span id="myTabs"></span>
<iframe id="myContent" style="border: 1px solid #aaa; height: 450px; width: 80%" frameborder=no></iframe>
<script>
var names = ["Subscribe", "View Subscribers", "Manage Subscribers", "Create Newsletter", "Change Password", "Log Out"];
var values = ["subscibe.php", "viewSubs.php", "manageSubs.php", "createNewsletter.php", "changePass.php", "logOut.php"];
var tabs = new AW.UI.Tabs;
tabs.setId("myTabs");
tabs.setItemText(names);
tabs.setItemValue(values); // store page URLs in the 'value' property.
tabs.setItemCount(6);
tabs.refresh();
</script>
<script>
tabs.onSelectedItemsChanged = function(selected){
var index = selected[0];
var value = this.getItemValue(index);
window.status = index + ": " + value;
document.getElementById("myContent").src = value; // iframe URL
}
tabs.setSelectedItems([0]); // load the first page.
</script>
my code
<style>
#myTabs {width: 55%}
</style>
<span id="myTabs"></span>
<iframe id="myContent" style="border: 1px solid #aaa; height: 450px; width: 80%" frameborder=no></iframe>
<script>
var names = ["Subscribe", "View Subscribers", "Manage Subscribers", "Create Newsletter", "Change Password", "Log Out"];
var values = ["subscibe.php", "viewSubs.php", "manageSubs.php", "createNewsletter.php", "changePass.php", "logOut.php"];
var tabs = new AW.UI.Tabs;
tabs.setId("myTabs");
tabs.setItemText(names);
tabs.setItemValue(values); // store page URLs in the 'value' property.
tabs.setItemCount(6);
tabs.refresh();
</script>
<script>
tabs.onSelectedItemsChanged = function(selected){
var index = selected[0];
var value = this.getItemValue(index);
window.status = index + ": " + value;
document.getElementById("myContent").src = value; // iframe URL
}
tabs.setSelectedItems([0]); // load the first page.
</script>
Sohail
October 28,