Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ajax Call and rawtext
#1
iw15.1.4

I have incorporated the Monaco editor (the same editor that runs vs code) into an iw application using the ajaxCall function.

Everything works nicely when i use normal words.   However, when I try to pass html data back to IW, then I get an error.

How would I pass back "raw" text using the ajaxCall function?   Do I need to wrap it in something?


Here is the example.

First here is my function call on the onclick

function (e){

ajaxCall("ajaxSaveCode",
        "&code='"+monaco.editor.getModels()[0].getValue()+"'",
        false,
        function(response){                             
});

return true;
}

If I try to send the following text back to IW then I get an error.

<html>
<body>
    <h1>Test Header</h1>
</body>
</html>



The error that I get says

127.0.0.1:8888 says
Ajax request failed: The application server did not respond.

URL:/21341234213/$/callback?
callback=ajaxSaveCode&code='<html>
<body>
  <h1>Test header</h1>
</body>
</html>'&. . . . .

As I said before if the text is just words with the html tags then it works as expected.
Reply


Messages In This Thread
ajax Call and rawtext - by joel - 09-13-2019, 01:02 AM
RE: ajax Call and rawtext - by joel - 09-13-2019, 04:40 AM
RE: ajax Call and rawtext - by Alexandre Machado - 09-14-2019, 12:27 AM
RE: ajax Call and rawtext - by Alexandre Machado - 09-14-2019, 12:46 AM
RE: ajax Call and rawtext - by joel - 09-14-2019, 10:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)