This is a migrated thread and some comments may be shown as answers.

JS-Error Combobox Load On Demand

3 Answers 69 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Torben Blanken
Top achievements
Rank 1
Torben Blanken asked on 28 Oct 2009, 03:04 PM

While using Combobox with LoadOnDemand with PC-Browser there is no error displayed and all is fine -
when using WindowsMobile-based devices and Opera Mobile 9.7 I get the following error-messages:

Invalid object passed in, ':' or '}' expected.
Unrecognized escape sequence.
Unterminated string passed in.



{"Command":"LOD","Text":"bre","ClientState":{"value":"","text":""."enabled ....

Do you have any idea on what happens here and how to fix this?

Best regards,
Torben

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 03 Nov 2009, 12:58 PM
Hello Torben Blanken,

This happens because, apparently, Opera Mobile escapes single quotes in the JSON returned by the Load on Demand request.

Can you please let me know on which line in the code does the error occur?

Kind regards,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Torben Blanken
Top achievements
Rank 1
answered on 06 Nov 2009, 12:45 PM
Sorry for beeing late with my answer ...

The errors seem to occur on the following lines:

Invalid object passed in, ':' or '}' expected. (75) , (105) , (134) , (153)

Invalid object passed in, member name expected. (72) , (73)

Unrecognized escape sequence. (140) , (241)

Unterminated string passed in. (157)


Hope this helps to identify and fix the problem.
Best regards,
Torben
0
Simon
Telerik team
answered on 16 Nov 2009, 01:33 PM
Hi Torben Blanken,

Please put the following script on your page after the ScriptManager and let me know whether it resolves the issue:

<script type="text/javascript">
    var oWebForm_DoCallback = WebForm_DoCallback;
    WebForm_DoCallback = function(uniqueId, command, onCallback, text, onError, flag) {
        oWebForm_DoCallback(uniqueId, command.replace(/"/g, "'"), onCallback, text, onError, flag);
    };
</script>

Regards,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Torben Blanken
Top achievements
Rank 1
Answers by
Simon
Telerik team
Torben Blanken
Top achievements
Rank 1
Share this question
or