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
Hello:
How do I set the ContentURL of a WebNavBar, for example "http://www.yahoo.com", on client side at runtime ? I could not find a method in the documentation on how to do this. SetContentURL("xxxxxxx") does not seem to be supported for this control, although IFrame content mode is available.
Would you have a workaround?
Regards,
Jean
Hello Jean,
You can try the following code to set ContentURL using TargetURL property and Click() method.
function ClickBarItem() { var navPane = ISGetObject("WebNavPane1"); var navBar = navPane.BarItems[0]; var navBarItem = navBar.Items[0]; navBarItem.TargetURL = "http://www.intersoftpt.com"; navBarItem.Click(); }
I refer to VariousClientSideObjectSamples.aspx in WebNavPane. I simply modify one of the NavBarItem and set TargetURL manually from client-side and trigger the item by using Click().
Hope this helps. Thank you.
Regards,-Martin-
Hello Martin,
Thank you for your reply. But this is not what I am looking for. I am looking for the ContentURL, not the TargetURL. In other words, I need the webpage to appear inside the iframe of the NavBar, not in a separate window.
In Pane Manager, I would use WebPaneName.SetContentURL("http://www.Intersoftpt.com") to insert your web page in the iframe of a WebPane. But I am using Navigation Pane here and the SetContentURL method is not available; so how do I insert a web page in the iframe of a NavBar at client side, when the bar is using IFrame ContentMode?
It seems that we don't have SetContentURL() method in WebNavPane. But I do have a workaround for this issue. You are still able to set the content url using the following code:
function DoSetURL() { var navPane = ISGetObject("WebNavPane1"); var navBarItem = navPane.BarItems.GetNamedItem("navbar_Item1") var navBarItemFrame = navBarItem.Parent.FrameObj.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0] navBarItemFrame.src = "http://www.intersoftpt.com"; }
What I did is to obtain the object which WebNavPane is using to set its ContentURL for the navbar item. In this case, I need to get the iFrame of NavBarItem. Therefore, this is how I get into that object. Then, set the src property to implement content url.
Regards.-Martin-
xxxx.Parent.FrameObj.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0]
You just need to change childNodes[0] to childNodes[1] for the 2nd childNodes from the end.
Therefore, for 2nd bar:
var navBarItemFrame = navBarItem.Parent.FrameObj.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[1].childNodes[0];
For the 3rd bar:
var navBarItemFrame = navBarItem.Parent.FrameObj.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[2].childNodes[0];
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