Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
formAPI not working
yalavarthi_Srini
I have enabled formapi in the iw.cfg and run iwreset, but a simple javascript alert box I have added to a DCT still doesn't show when the DCT is loaded, I have pasted the contents of the dct.
I am using TeamSite 5.5.2 SPb, IE5.5
[teamsite_templating]
use_preconnect_remap=true
enable_formapi=true
<?xml version="1.0" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content" name="targeted_content">
<!-- data-capture-requirements elements contain area elements -->
<ruleset name="targeted_content">
<script>
<![CDATA[
function init() {
alert ("formAPI working");
IWEventRegistry.addItemHandler("/DefaultCondition/DefaultContent", "onItemChange", displayMessage);
}
function displayMessage() {
alert ("Hello, world!");
}
init();
]]>
</script>
<description>
Allows the entry of data relating to the Targeting Content.
</description>
<item name="Condition">
<description>Replicant Condition fields. </description>
<replicant max="10">
<item name="Participants">
<description>Participants Condition fields. </description>
<replicant max="4">
<item name="Participant">
<description>Select a participants from this dropdown.</description>
<label>Participant</label>
<select required="t">
<option value="test1" label="test1"/>
<option value="test2" label="test2"/>
<option value="test3" label="test3"/>
<option value="test4" label="test4"/>
</select>
</item>
<item name="values">
<description>Click on the Define button, to select values.</description>
<label>values</label>
<textarea rows="3" cols="50" wrap="physical">
<cgi-callout url="/iw-bin/show_env.cgi" label="Define" window-features="width=500,height=500,resizable=no,toolbar=no,scrollbars=yes"/>
</textarea>
</item>
</replicant>
</item>
<item name="show_this_file">
<description>Click on the browse button, to select a file for above participants.</description>
<label>Show this file</label>
<browser size="50" extns=".htm,.html" initial-dir="/" />
</item>
</replicant>
</item>
<container name="DefaultCondition" combination="and">
<label>Default Condition</label>
<item name="DefaultContent">
<description>Enter text for Default content.</description>
<label>Default content</label>
<textarea rows="15" cols="60" wrap="physical" />
</item>
</container>
</ruleset>
</data-capture-requirements>
Thanks
Find more posts tagged with
Comments
Migrateduser
try with out <![CDATA[[ ]]>
i think it will work
yalavarthi_Srini
still it doesn't work. Do i need to run iwreset -a or iwreset -ui
Migrateduser
yep. You have to do that.It seems to be it is not recognizing .
yalavarthi_Srini
It is working.......run
iwreset -a
, not just iwreset