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)
CGI callout error
herald10
Hi,
I am using a CGI callout to add a new option to a dropdown in the DCT. For some reason it works in Nettscatpe and doesn't work in IE. It throws a "Server thew Exception".
<html>
<head>
<script language="javascript" type="text/javascript">
var api = opener.parent.getScriptFrame();
//var index = api.IWDatacapture.getItem("/city_region").getValue();
//parent.window.alert(index+"<--");
var newOption = new Option("$cityregion", 157,true, true);
api.IWDatacapture.getItem("/city_region").addOption(newOption);
index=api.IWDatacapture.getItem("/city_region").getValue();
//parent.window.alert(index+"<-");
api.IWDatacapture.redraw();
</script>
</head>
</html>
The line highlighted in the red is the culprit. Any one see any thing wrong with that?
Thanks
-H
Find more posts tagged with
Comments
Adam Stoller
I suggest you add alerts between the various statements in your javascript code portion and see if you can further refine where the problem is.
The fact that it works in Netscape and not in IE would *seem* to indicate that it is a syntactic issue more than a logic issue
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
herald10
I tried putting alert statements around it. Everything is fine except the addOption part. It just doesn't like it.
api.IWDatacapture.getItem("/city_region")
'
This is ok. When I add addOption to it, its throwing that error.
any ideas?
Thanks
-H
Adam Stoller
Can you show us what the *actual* DCR code looks like for /city_region ?
I ask because one of the things I found changed when I went from 5.5.2 to 6.x with my customer's setup was that 5.5.2 used to be able to handle having a "shell" of a DCR processed multiple times before veriying the value of a simple radio-button field at the end. The XML processing took something that looked like:
<item name="Page Break Indicator"><value></value></item>
and changed it to look like this:
<item name="Page Break Indicator"><value/></item>
In 5.5.2 the following FormAPI code had no problem:
radioItem = IWDatacapture.getItem("/Article Section[1]/Page Break Indicator");
if (radioItem.getValue() == null) {
radioItem.setValue(1);
}
But in moving to 6.x it started throwing errors so I had to change the "shell" to ensure that it contained a value for this field:
<item name="Page Break Indicator"><value>
1
</value></item>
and so I'm now wondering if you're running into a similar issue where perhaps the DCR's XML structure - at the point in time when the FormAPI code is being run - may be missing an initial "value" such that the initial getItem() works, but the addOption() is failing.
Kind of a long-winded response - and potentially way off-base - but worth investigating I think...
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
herald10
Ghoti,
The DCR item looks like:
<item name="city_region">
<label>City Region</label>
<database data-type="VARCHAR2(200)" />
<select required="t">
<inline command="/interwoven/iw-home/bin/callout_wrapper.ipl cityregion.ipl" />
<cgi-callout url="/iw-bin/cityregion_callout.cgi" window-features="width=320, height=200, resizable=yes, toolbar=no,scrollbars=yes" label="Add New City" />
</select>
</item>
And we haven't yet upgraded to 6.X. Still on Teamsite 5.5.2[solaris]
Thanks
-H
Adam Stoller
That's what the DCT looks like - the question I was asking was what does the DCR look like after the inline command has been executed.
However, if you haven't upgraded to 6.x yet - my previous post is probably not that useful.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com