Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
getOptions()[].value is null error
System
The following code is giving me a javascript error of getOptions()[].value is null or not an object
That would be on this line:
var myvalue = item.getOptions()[typeItem.getValue()].value;
Does another set of eyes see something I don't - I tried to in the main function var typeItem = 0; but that didn't work then I tried to create a dummy var called flag and had something like this
var flag = item.getOptions()[typeItem.getValue()].value = 0;
but no luck as well - likely/hopefully it's something small I don't see
function autourl()
{
IWEventRegistry.addItemHandler("/pm", "onItemChange", selectedValue);
selectedValue(IWDatacapture.getItem("/pm"));
}
function selectedValue(item)
{
var typeItem = IWDatacapture.getItem("/pm");
var typeIndex = typeItem.getValue();
var typefield = IWDatacapture.getItem("/ByLine_Name");
var myvalue = item.getOptions()[typeItem.getValue()].value;
var mytext = item.getOptions()[typeItem.getValue()].text;
var mylink = "<a href ='/sc?templ=managerBio&id="+myvalue+"'>"+mytext+"</a>";
//window.alert(myvalue);
//window.alert(mylink);
typefield.setValue(mylink);
IWDatacapture.redraw();
}
autourl();
Thanks
Find more posts tagged with
Comments
There are no comments yet