K
kookie
I am trying to set up my form so as it moves through development process the
correct viwe is displayed. first or default view if my selection page to
define the content. at this point I can dynamacally have the form display
between these to views. if editing has begun it will bypass the selection
page. when I add a third variable this the code it messes the dynamic
selection up. I am using Jscript.
<code>
function defaultView()
{
//Pick the default view based on the value of element DefaultView
var objDefaultView =
XDocument.DOM.selectSingleNode("/my:myFields/my:ContentType");
//var objPreview = XDocument.DOM.selectSingleNode("/my:myFields/my:Status");
if ((objDefaultView == null) || (objDefaultView.text == "")) {
XDocument.ViewInfos("Make Selection").IsDefault = true;
}
else { //((objDefaultView != null) || (objDefaultView.text != "")) &&
(objPreview.text != "Final - 100%")) {
XDocument.ViewInfos("Main").IsDefault = true;
}
/*else if ((objDefaultView != null) || (objDefaultView.text != "") &&
(objPreview.text == "Final - 100%")) {
XDocument.ViewInfos("Step Action").IsDefault = true;
}
*/
}
</code>
I have the commented part out the I cant get working.
I am using to different fields. the second one will be blank or at lest it
will not ne "Final" until the last stage. I tried to get the view to display
if both variables were true.
Please help
correct viwe is displayed. first or default view if my selection page to
define the content. at this point I can dynamacally have the form display
between these to views. if editing has begun it will bypass the selection
page. when I add a third variable this the code it messes the dynamic
selection up. I am using Jscript.
<code>
function defaultView()
{
//Pick the default view based on the value of element DefaultView
var objDefaultView =
XDocument.DOM.selectSingleNode("/my:myFields/my:ContentType");
//var objPreview = XDocument.DOM.selectSingleNode("/my:myFields/my:Status");
if ((objDefaultView == null) || (objDefaultView.text == "")) {
XDocument.ViewInfos("Make Selection").IsDefault = true;
}
else { //((objDefaultView != null) || (objDefaultView.text != "")) &&
(objPreview.text != "Final - 100%")) {
XDocument.ViewInfos("Main").IsDefault = true;
}
/*else if ((objDefaultView != null) || (objDefaultView.text != "") &&
(objPreview.text == "Final - 100%")) {
XDocument.ViewInfos("Step Action").IsDefault = true;
}
*/
}
</code>
I have the commented part out the I cant get working.
I am using to different fields. the second one will be blank or at lest it
will not ne "Final" until the last stage. I tried to get the view to display
if both variables were true.
Please help