Abhiram Diddigi home

Hiding a Tab in Order Guide

This is not a very great trick. The following code will explain how to hide a tab in the Order Guide.

Supposing you want to hide the Tab2 onLoad, then write this script on the OnLoad of TAB1 form.


var arr = $$("a");
var i=0;
while(arr[i]){
// alert(arr[i].innerHTML);
if(arr[i].innerHTML == "tab2"){//If you want to hide the tab2, this "tab2" you can get by selecting the Tab with Firebug
arr[i] .style.display = 'none';

}
i++;
}

If You haven’t still used Firebug and Prototype I would recommend you to do so. It simplifies many things :)