As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I created a list box in the html painter that has only two values, a Y or an N. The list box should only be enabled if any one of six customer ids (example: 9999999900) are entered into another box on the form that has the name IDEnter in the Properties window. The value for the IDEnter box says Enter an ID in the Properties window. The IDEnter box is where the user types in the customer id, such as 9999999900. The name of the list box is lstnatl. I came up with the following pasted code that doesn't work. I'm thinking that I do need to do an if then else logic. Does anyone know the correct Java code? Thanks.
< !--National flag validation--MBrooks--> if (document.hmirform.IDEnter.value=='Enter an ID' || document.hmirform.IDEnter.value=='9999999900') { document.hmirform.lstnatl.disabled=true; } else { document.hmirform.lstnatl.disabled=false; } }This message has been edited. Last edited by: Kerry,
Your piece of Javascript code (not Java) seems OK but it does nothing unless you "attach" it to a specific event. If you need that piece of code to run right after the value of IDEnter is changed by the user, then you need to say so in the IDEnter definition itself. Something like:
Your sample code could then be defined as a Javascript function at the beginning of your HTML document:
<script type="text/javascript">
function checkStatus() {
// Paste your code here!
}
</script>
Mind you, the technique illustrated is the standard behaviour and shows the connection with a "regular" HTML document and Javascript. When using the Layout Painter, there are some extra Javascript and XML definitions that get added to the HTML document by the tool as they are needed to automate their functionality thus making the document not so "regular" anymore. You need to be careful as to where to plug your Javascript function and which event needs to be adjusted.
Perhaps someone with more experience in the Layout Painter tools might be able to give more useful hints.
Your reply was exactly what I was looking for. I do however have an additional question. There is already an INPUT statement in the html code that reads as follows:
Your one of the best. The code you sent me works fine. One last question. I need to enable five additional customer ids in addition to the 9999999900 id. How do I incorporate the additional five customer ids into the logic? I tried the following logic, but it does not work. Thanks a million!!!
<!--National flag validation--MBrooks-->
if (document.hmirform.IDEnter.value=='Enter an ID' || document.hmirform.IDEnter.value=='9999999900')
document.hmirform.IDEnter.value=='Enter an ID' || document.hmirform.IDEnter.value=='9999999990')
document.hmirform.IDEnter.value=='Enter an ID' || document.hmirform.IDEnter.value=='9999999991')
document.hmirform.IDEnter.value=='Enter an ID' || document.hmirform.IDEnter.value=='9999999992')
document.hmirform.IDEnter.value=='Enter an ID' || document.hmirform.IDEnter.value=='9999999993')
document.hmirform.IDEnter.value=='Enter an ID' || document.hmirform.IDEnter.value=='9999999994')
{
document.hmirform.lstnatl.disabled=false;
}
else
{
document.hmirform.lstnatl.disabled=true;
}
}
njsden, thanks for the javascript sample code. I found out was I was doing wrong and was finally able to add additional customer ids into my 'if then else' statements and got the code to work. Disregard my previous two messages.