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
Placing var Value into DCT field
System
In the following snippet - I'm correctly getting all my values
and forming a href the way I want. However, I'm now having one **** of a time trying to get the value of var pm into the DCT field whose item is pm - as you can see below the two commented out lines using getElementbyId didn't work - I thought that would be the winner - any suggestions would be great. Also - I'm kind of surprised that the value attritbute can't be used with the text tag?
Here's my js/form api code:
function init()
{
IWEventRegistry.addItemHandler("/misc", "onItemChange", selectedValue);
selectedValue(IWDatacapture.getItem("/misc"));
}
function selectedValue(item)
{
var typeItem = IWDatacapture.getItem("/misc");
var typeIndex = typeItem.getValue();
var myname = item.getOptions()[typeItem.getValue()].value;
var mytext = item.getOptions()[typeItem.getValue()].text;
var pm = "<a href ='/sc?bio="+myname+"'>"+mytext+"</a>";
//document.dcreditForm.pm.value = pm;
//document.getElementById('pm').value = pm;
window.alert(myname);
window.alert(pm);
IWDatacapture.redraw();
}
init();
Here is my simple DCT - two fields:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE datacapture SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content" name="testdct">
<!-- data-capture-requirements elements contain area elements -->
<ruleset name="test">
<description>
A product description
</description>
<item name="misc" rowcontinue="f">
<label>misc</label>
<description></description>
<inline command="d:/iw-home/Interwoven/TeamSite/iw-perl/bin/iwperl.exe d:/iw-home/Interwoven/TeamSite/httpd/iw-bin/inline_get_help_type.ipl"/>
</item>
<item name="pm">
<text required="t" size="40" />
</item>
<script language="javascript" location="template-type" src="shoescript.js"/>
</ruleset>
</data-capture-requirements>
Find more posts tagged with
Comments
There are no comments yet