Four Js Development Tools Forum

Discussions by product => GAS and GBC => Topic started by: liu h. on March 17, 2010, 05:04:47 am



Title: error: unterminated string literal
Post by: liu h. on March 17, 2010, 05:04:47 am
hello:
I used ui.Interface.frontCall( module, function, [param1], returning-list ) to call my custom javascript function,
when the param1 has more than 4096 characters,i got the error message  "unterminated string literal " in firefox 3.6.
gwccore.js line 3380:

var fcInfo = eval(fcElt.firstChild.data);

change to :

var fcInfo = eval(typeof(fcElt.textContent) != "undefined" ? fcElt.textContent : fcElt.firstChild.data);


^_^


Title: Re: error: unterminated string literal
Post by: Olivier E. on March 17, 2010, 02:26:31 pm
Hello Hsien,



  Please technical forum purpose is not to report support issues. May I ask you to send this to your support center ?


Thank you,

Olivier ECKERT  - Four J's support


Title: Re: error: unterminated string literal
Post by: . on March 17, 2010, 03:02:43 pm
Hi Liu Hsien,

As Olivier ECKERT told it, this kind of issue normally has to be handled through the support channel as it is for technical purpose, so next time don't hesitate to contact your support center to get help for such problems.

Anyway, your issue has been filed in our database as:

#16679 - ui.Interface.frontCall failed with long arguments

It will be fixed in next GAS release.
Meanwhile, the following change in your "FGLASDIR/tpl/SetAjax/gwccore.js" file should clear the problem:

change:

Code
  1. function _CreateDoc(ml){
  2.  
  3.  return domParser.parseFromString('<div xmlns="http://www.w3.org/1999/xhtml">' + ml + '</div>', 'application/xhtml+xml').documentElement;
  4. }
  5.  

into:

Code
  1. function _CreateDoc(ml){
  2.  
  3.  var xmlDoc = domParser.parseFromString('<div xmlns="http://www.w3.org/1999/xhtml">'+ml+'</div>', 'application/xhtml+xml');
  4.  xmlDoc.normalize();
  5.  return xmlDoc.documentElement;
  6. }
  7.  


Best regards,
Guney