I am still battling with this task pane, but I have a new problem.
At the moment, only half of the fields are availible on the form, so I can use specific node names for now on each section (which puts my other problem on hold) my current problem is that the code used references an ID of a html element in the task pane that is the same as the node name, but there is no div id associated with my section names, or my labels.
Is there a way to provide an error checking on this to say "if that id does exist" so that i may put it in than if statement to avoid errors on the form.
here is the code again (yes its a copy-paste from an MS lab):
if (eventObj.Type == "ContextNode")
{
// Retrieve task pane object
var oTaskPane = XDocument.View.Window.TaskPanes.Item(0);
// Retrieve html object for task pane
var oHTMLDoc = oTaskPane.HTMLDocument.all;
// Clear previous help topic from task pane
if (helpString)
oHTMLDoc.item(helpString).style.display="none";
// Display DIV statement having same ID as the context node name
oHTMLDoc.item(eventObj.Context.nodeName).style.display="";
// Keep record of string displayed, so can later be cleared
helpString=eventObj.Context.nodeName;
return;
}
note that "helpString" is a global variable