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)
IWItem.setOptions Error
frbcraig
Hi,
I am receiving ann error that reads "'selected' is null or not an object" when attempting to use the setOptions method. The code I am using is as follows:
newDayOptions = new Array();
for (var x = 0; x <= 27; x++)
{
newDay = x++;
newDayOptions = new Option(newDay, newDay);
}
y = IWDatacapture.getItem("/SpecAnnouncements[1]/Expiration/SpecialAnnouncements_contentexpiration_day");
y.setOptions(newDayOptions);
When I call setOptions it kicks out with this error. I know it's something simple, but just can't figure out what I'm doing wrong....any suggestions???
Thanks
Find more posts tagged with
Comments
pdasarat
You have to do a getOptions() first and then do a getItem() of setOptions()
Try with this modifications.
t = IWDatacapture.getItem("/press/Layout/type"+j).getOptions();
IWDatacapture.getItem("/press/Layout/type"+j).setOptions(t);
Hope this helps.
-Pradeep
Victor2
Hi,
I have the following script block which gives the same error:
// Global XPath
var iStudyMolecule = "/main/study/studymolecule";
var oMolecules = oMoleculeXml.getElementsByTagName("molecule");
var aOptions = new Array();
for (var i=0; i aOptions[aOptions.length + 1] = new Option(oMolecules
.attributes.getNamedItem("Molecule").value,oMolecules
.attributes.getNamedItem("Molecule").value );
}
var iMolecule = IWDatacapture.getItem(iStudyMolecule);
iMolecule.setOptions(aOptions);
Can anyone spot what is going wrong here ?
Windows 2003, TeamSite 6.7.1 with sp1
Regards
Vaqas
12201_12140_new_report_jdbc.rptdesign
ISCBorisB
I have the following script block which gives the same error
It would be nice to know what actually is the error...
post-16891-13064892290548.jpg