Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
JS Problem
System
I am trying to work with a selectindex value. I am able to capture it and display it in a alert box. But when I try to check to see if its the particular value thats been selected, the alert/if statement doesnt work.
// Get the month selected to determine the number of of replicants allowed (28/29/30/31)
var monthItem = IWDatacapture.getItem("/Month");
var monthOptions = monthItem.getOptions();
var monthSelectionIndex = monthItem.getValue();
// this works and shows the correct value
{
alert("Test1 " + monthSelectionIndex);
}
// does not work with "2" and / or without the return statement
If (monthSelectionIndex == 2)
{
monthdays = 31;
alert("Test2 " + monthdays);
return true;
}
Find more posts tagged with
Comments
akshathp
Change the uppercase "I" of your if statement to lowercase"i". That should do it...
Akshat Pramod Sharma
Interwoven Inc.
Migrateduser
Silly me ! a captalization problem - now on to the next big thing I am trying to do (if it can be done).
I'd like to set up a variable for the replicant max= item based on the month selected. For instance, January can have a maximum of 31 replicants while Feb 28 (29 leap years) and March 31, etc. Is dynamically setting the max parameter possible ? It is my guess it would be run via a JS file?