Hide tab

Hi I created an application on trial version and trying to hide a tab.This tab is created by adding a page.I mean this is not a block tab.I used block tabs in another app and used sc_block_display macro to hide it.

Is it possible to hide a tab (not a block tab)?

Thank you,

Pola

Re: Hide tab

No reply on this one … any pointers please ?

Re: Hide tab

I belive that there inst an option to hide a “page”.

you can try a workaround if you really wanna. Find the element id and execute a javascript function to hide :slight_smile:

Re: Hide tab

Diogo - SC does not let me see the view source on the browser, how do I find the element Id ?

Thank you,

Pola

Re: Hide tab

?? ScriptCase doesnt allow you to see the source? But its a browser functionality :-p open the form source-code in chorme or mozilla firefox … search for you “page name”, the text … and you’ll see the ID … now you just need to echo a javascript to hide … document.getElementById(‘IDNAME’).style.display=‘none’ …

to learn more: http://www.w3schools.com/css/pr_class_display.asp

Re: Hide tab

Thank you for the clarification.I have been using IE and all I could see was this , when I right click and see the source.

“<span style=“border: 1px solid #048; position: absolute; top: 0; left: 50%; color: #000; background-color: #fff; padding: 1px 3px”>Scriptcase trial version</span>”

Since I was using trial version,I thought it was a restriction from SC to see the source.

with the firefox I am able to see the source.

Thank you,

Pola

Re: Hide tab

No luck. I tried using the following statement in load as well as applicationInit … It has no effect.

echo “<script>document.getElementById(‘id_label_c2_name’).style.display=‘none’;
document.getElementById(‘id_label_c2_relation’).style.display=‘none’;
document.getElementById(‘id_label_c2_relation’).style.display=‘none’;
document.getElementById(‘id_label_c2_phone_type’).style.display=‘none’;
document.getElementById(‘id_label_c2_phone’).style.display=‘none’;
document.getElementById(‘id_label_c2_email’).style.display=‘none’;</script>”;

Regards,

Pola

Re: Hide tab

Try to use this on onload

echo "
<SCRIPT>
$(document).ready(function() {
document.getElementById(‘id_label_c2_name’).style.display=‘none’;
document.getElementById(‘id_label_c2_relation’).style.display=‘none’;
document.getElementById(‘id_label_c2_relation’).style.display=‘none’;
document.getElementById(‘id_label_c2_phone_type’).style.display=‘none’;
document.getElementById(‘id_label_c2_phone’).style.display=‘none’;
document.getElementById(‘id_label_c2_email’).style.display=‘none’;
});
</SCRIPT>
";

Cause the html is not loaded yet. Im without my notebook right now, but soon as possible i’ll test.

Re: Hide tab

No luck still. I have noticed that echo is writing the code before the HTML block began.Since this is a jquery code and jquery is getting included after this custom code , nothing is happening on the screen.where do I put this code,so this gets executed after the jquery is loaded ?

This is what is written before <HTML> block.
<SCRIPT>
$(document).ready(function() {
document.getElementById(‘id_form_student_form5_t’).style.display=‘none’;
document.getElementById(‘id_form_student_form5_tr’).style.display=‘none’;
document.getElementById(‘id_form_student_form5_tl’).style.display=‘none’;
document.getElementById(‘id_form_student_form5_4’).style.display=‘none’;
document.getElementById(‘id_form_student_form5_5’).style.display=‘none’;
document.getElementById(‘id_form_student_form5_6’).style.display=‘none’;
});
</SCRIPT>

Regards,
Pola