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)
select list passed back as a string?
sabih
I am getting a path parameter that I need to use to pass it a list retrieved from the DB as the select item list. Is there a way to pass the entire select list e.g:
$str ="<option value='142769' label='142769'/>";
$str .= "<option value='142792' label='142792'/>";
as a string (not using substitution) from a perl script back to DCT its called from path of the select element like the following?
print <<EOF;
<script>
var api = parent.getScriptFrame().IWDatacapture;
setVal("/test/abc", "$str");
try {
parent.getScriptFrame().tick();
}
catch (e) {}
function setVal (path, val)
{
var item = api.getItem(path);
if (! item) {
return;
}
item.setValue(val);
}
</script>
EOF
Find more posts tagged with
Comments
jbonifaci
Is this a cgi callout, callServer or inline? Either way the answer is yes. With inlines you just output the options. With the cgi callout and callServer, you use formapi to setOptions.
~Jeff