Welcome Guest Search | Active Topics | Sign In | Register

Set visiblility of TabStrip-Item with Java Options
Roland Desort
Posted: Wednesday, October 17, 2007 6:28:25 AM
Rank: Member
Groups: Member

Joined: 10/12/2007
Posts: 13
Hi,

I want to set the visiblility of a tabstrip-item clientside within a java-script. But in your documentation under the topic client API referenceI can't find an information about tabstrips.

Could you be so kind to give a short example how to set the visibility of an item (itemID is known).

Thanks in advance.
eo_support
Posted: Wednesday, October 17, 2007 6:41:51 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

TabStrip client side API works exactly the same as menu. You can find a sample at here:

http://www.essentialobjects.com/Demo/Default.aspx?path=Menu\menu_programming\_i2\js_modify_menu

The same code should work for TabStrip as well.

Thanks
Roland Desort
Posted: Wednesday, October 17, 2007 7:08:59 AM
Rank: Member
Groups: Member

Joined: 10/12/2007
Posts: 13
Sorry, I'm not trained in Java. This is the script I use:

function fcCheckArt()
{
var tabStrip = eo_GetObject('tabMain');

if (document.getElementById('cmbContactArt').value == 'F')
{
tabStrip.getItem('tabFirma').setDisabled(false);
tabStrip.getItem('tabFirmaAP').setDisabled(false);
}
else
{
tabStrip.getItem('tabFirma').setDisabled(true);
tabStrip.getItem('tabFirmaAP').setDisabled(true);
}
}

There is something wrong, but I don't know, what.
"tabMain" is the tabstrip-control
"tabFirma" and "tabFirmaAP" is the itemID
eo_support
Posted: Wednesday, October 17, 2007 7:25:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Well, you do need to be familar with JavaScript if you want to use our JavaScript interface, otherwise you will be just giving yourself headaches. :)

The only problem we can see is there is no "getItem" method on tabStrip. So you can not just invent it like that. You will need to go to the client side JavaScript reference section to find out what's there and use them. Other thant that your code looks fine.

Thanks
Roland Desort
Posted: Wednesday, October 17, 2007 8:53:15 AM
Rank: Member
Groups: Member

Joined: 10/12/2007
Posts: 13
Tanks for this info, I'm working on my javascript experiance every day.

It's nice, that you tell my, that the tabstrip-control does not have a "getitem"-method. Due to you are the support for this control and I'm the customer, I think, it's allowed to ask, how to get an tabstrip-item by javascript. It looks like your controls are build very professional and there has to be a way. Who should I ask, if not you?

So please give me a hint, because the "http://www.essentialobjects.com/Demo/Default.aspx?path=Menu\menu_programming\_i2\js_modify_menu" doesn't help, cause I have no such event and therfore now "info"-control to work with.

one more time: Thanks in advance.
eo_support
Posted: Wednesday, October 17, 2007 9:11:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi Roland,

Absolutely. And we shall do our best to support our customers. :) However one thing that we want to avoid is to repeat everything that's already in the document. When the contents is already in the document, we direct our customers to that and there is no need to repeat it here, because the document actually gives you everything that's available, and it would be an absolute waste of time for us to repost it here. Only if you do not find what's your need there, we will post additional information here.

The very first thing you want to go over is eo_GetObject, as you already see in our sample code:

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Global.eo_GetObject.html

This function returns an "object", in your case, it returns a "Navigator" object. You can find what method Navigator has at here:

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Navigator.html

From there you can go further and see what other methods/objects are available until it gives what you need. It should be very straight forward. The whole documentation is also avaliable on your local harddrive as a .chm file, which is searchable and is faster than the online version. So you might want to use that instead. Eitherwise you will have to rely on the documentation to find what you need.

Thanks
Roland Desort
Posted: Wednesday, October 17, 2007 9:25:25 AM
Rank: Member
Groups: Member

Joined: 10/12/2007
Posts: 13
:d/
Thanks a lot! Now I got it.

Sorry about the count of questions, but it's hard for me to get familar with your controls. I've a big application and I try to create a new and better design (using your controls). Therefore I want to understand the functionality before I start to convert the forms.

So maybe this was not my last last request (I'm quite sure!)

Thanks for help
(Hope you can read my english, schooltime is long time ago ;-))
eo_support
Posted: Wednesday, October 17, 2007 9:29:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Appreciate your understanding. Since we have very good and responsive tech support, a lot of our users ignore our documentation. But our documentation is equally good. :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.