iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi
How do i disable a WebExplorerBarItem. I want to disable a single item Client Side in a WebExplorerBar, but there doesnt seem to be a way to do it. I tried setting Enable = false, but that didnt work.
Eric
Still need an answer on this please.
You are heading to the right direction. Disabling WebExplorerBarItem in client-side can be done simply by setting the value of Enabled property of the specific WebExplorerBarItem to false.
function button1_onclick() { var WEP1 = ISGetObject("WebExplorerPane1"); // set the 'Enabled' property to "false" in order to have the WebExplorerBarItem disabled WEP1.Panes.GetNamedItem("bar_ExplorerPane01").PaneItems.GetNamedItem("itm_ItemA").Enabled = false; return true; }
In WebExplorerBarItem, we can specify the TargetURL and TargetWindow property like the following snippet code.
<ISWebDesktop:WebExplorerBarItem Name="itm_ItemA" Text="Item A" TargetURL="http://www.intersoftpt.com/" TargetWindow="_blank" />
By setting those properties, clicking the WebExplorerBarItem will open a new browser window that opens the Intersoft Solutions home page. When WebExplorerBarItem is disabled, clicking on it will not open the specified URL in a new browser window.
In order to have the WebExplorerBarItem greyed out, we need to get its element (by invoking GetElement() method) and then set the value of disabled property to true. This step will make the WebExplorerBarItem becomes grey like ordinary disabled item shown in browser.
function button1_onclick() { var WEP1 = ISGetObject("WebExplorerPane1"); // set the 'Enabled' property to "false" in order to have the WebExplorerBarItem disabled WEP1.Panes.GetNamedItem("bar_ExplorerPane01").PaneItems.GetNamedItem("itm_ItemA").Enabled = false; // get the element of WebExplorerBarItem and set the disabled property to "true" // in order to greyed out the row element WEP1.Panes.GetNamedItem("bar_ExplorerPane01").PaneItems.GetNamedItem("itm_ItemA").GetElement().disabled = true; return true; }
Hope this helps.
Apologize for the delay in sending this.
Ok now i need to set on the client side the TargetURL. The following code doesnt work, what am i doing wrong?
explorerPane.Panes.GetNamedItem("bar_VirtualServer").PaneItems.GetNamedItem("itm_ModifyVM").GetElement().TargetURL = "ModifyVM.aspx?ID=" + vmGUID;
Please try to use the code below and let us hear your feedback.
explorerPane.Panes.GetNamedItem("bar_VirtualServer").PaneItems.GetNamedItem("itm_ModifyVM").TargetURL = "http://www.google.com/ncr";
Thank you and have a nice day.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname