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)
textarea and FormAPI
Ottawa_IWOV
I have a visual format textarea that is capturing around 4000 characters. I am trying to pass this into a callServer (with a params object), but it does not work in IE. However, in Mozilla it works fine.
I have stripped my callserver script so it only prints out HTML javascript to let me know when I have roundtripped.
I can alert the whole textarea no problems, it just seems that when I perform the callServer, something happens.
However, I cannot get any useful error messages to help me. And I would love to know why it works fine in Mozilla...
Thanks,
Find more posts tagged with
Comments
Johnny
are you using GET or POST on your callserver...
I think you'll need to POST that many characters.
John Cuiuli
Ottawa_IWOV
How exactly do I perform that?
Migrateduser
The GET limit is ridiculously high, like 65K or something, I believe. Ottawa, posting the code would help us determine the problem.
Dave
Current Environment(s):
(1) TS 6.5 on Solaris 9
(2) TS 6.1 SP1 on W2K3
(3) TS 6.1 on W2K
Ottawa_IWOV
Here you go:
<script>
<![CDATA[
//This JS should be stored in an external script
//somewhere in the /iw/custom folder
function initAutoTerms() {
var terms = IWDatacapture.getItem("/mt_terms");
//Hide the terms field upon loading the DCT
hideTerms(terms);
IWEventRegistry.addItemHandler("/mt_subject", "onCallout", suggestTerms);
}
function hideTerms(item){
item.setVisible(false);
}
function suggestTerms () {
var params = new Object();
var content = IWDatacapture.getItem("/content").getValue();
params.content = content;
//Perform a callServer
var server = window.location.hostname;
var url = "http://"+server+"/iw-bin/iw_cgi_wrapper.cgi/suggestTerms.ipl";
IWDatacapture.callServer(url,params,true);
}
function populateLocations(summary) {
//Grab the item for displaying the terms
var termsItem = IWDatacapture.getItem("/mt_terms");
//Set the terms returned from MetaTagger as options
termsItem.setValue(summary);
//Turn visibility of the element to TRUE
termsItem.setVisible(true);
//alert("round tripped");
}
IWEventRegistry.addFormHandler("onFormInit", initAutoTerms);
]]>
</script>
I didn't post the callServer script, because it does not seems to be the problem. Let me know if you want it anyway
Migrateduser
Your code looks just fine -- is your callserver script even being interpreted? I wonder if there might be a character in your textarea that IE doesn't like... have you tried passing just a character or two to the script? I see many alerts in your code, but have you tried alerting params.content?
Dave
Current Environment(s):
(1) TS 6.5 on Solaris 9
(2) TS 6.1 SP1 on W2K3
(3) TS 6.1 on W2K
Ottawa_IWOV
Yeah, I have tried alerting everything under the sun. I can alert the whole content field (regardless of size), and it doesn't show me any funny characters. I have been doing further tests with a simple textarea (no visualformat). So the callserver seems to work fine if I send content that is less that 2000 characters for some odd reason.
And this is definitely not desirable.
Migrateduser
I just did a little digging and, according to a W3C doc (published in 2001, so take that into account), there was a time when URI's were limited to 256 characters. This is not the case anymore, but while the W3C limits URI's to 65536 characters, it's commonly a
server
limitation as to the length of the URI that will be processed.
Johnny suggested a POST instead of a GET and while that's a good concept, I think that CallServer only does GET's.
Dave
Current Environment(s):
(1) TS 6.5 on Solaris 9
(2) TS 6.1 SP1 on W2K3
(3) TS 6.1 on W2K
cliffhanger
Dave,
I thought if you provide
isGet=true
in
IWDatacapture.callServer
(
url
,
data
,
isGet
),
then it's a
Get
and it becomes a
HTTP POST
if you keep
isGet=false
-Cliff
Migrateduser
Oh! If that's the case, I'm glad I'm wrong! Well then, the POST seems to be the best answer for this.
Thanks!
Current Environment(s):
(1) TS 6.5 on Solaris 9
(2) TS 6.1 SP1 on W2K3
(3) TS 6.1 on W2K