XMLHttpRequest it's not recognized

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

XMLHttpRequest it's not recognized

Postby marco.rossi » Mon Sep 07, 2015 3:12 pm

Hi all,

I'm not what we can call a "web-shark".
I have to connect my solution to a big printer.
The printer's producer has provided some javascript samples that are using that object: XMLHttpRequest()
Watching around the web, I've find that page: http://www.w3schools.com/xml/xml_http.asp, in wich is written that
within all the modern browser there's a built-in XMLHttpRequest Object.

The problem is that I'm obtaining this error:
ReferenceError: "XMLHttpRequest" is not defined.
The object is not initialized and, of course, the first related method I call, makes the program to goes in error.
For example on the application server I obtain:
org.mozilla.javascript.EcmaError: TypeError: Cannot call method "abort"

Can anyone tell me why this object is not recognized?
I'm trying all on the servoy webclient.

Servoy 7.4.4, Java 1.8.60.
Tested with Developer on windows 7
Tested with Application server on windows server 2012

Thanks in advance

Marco
Marco Rossi
Senior Analyst Developer
Freelance Consultant

IT Manager @Mantho
Webmaster @Sitoliquido
marco.rossi
 
Posts: 110
Joined: Sun Apr 12, 2015 9:33 pm

Re: XMLHttpRequest it's not recognized

Postby mboegem » Mon Sep 07, 2015 4:16 pm

marco.rossi wrote:Watching around the web, I've find that page: http://www.w3schools.com/xml/xml_http.asp, in wich is written that
within all the modern browser there's a built-in XMLHttpRequest Object.


Few questions:
1) which browser + version are you testing on?
2) will all users use a 'modern browser'?
3) what/how did you implement so far

If I type var x = new XMLHttpRequest() in the latest Chrome browser, it just works...
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1808
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: XMLHttpRequest it's not recognized

Postby david » Mon Sep 07, 2015 4:43 pm

marco.rossi wrote:Can anyone tell me why this object is not recognized?
I'm trying all on the servoy webclient.

Servoy 7.4.4, Java 1.8.60.
Tested with Developer on windows 7


Webclient code is run from the context of the server, not the user's browser. And Servoy server is not a browser — the equivalent functionality is the http plugin.

The web client utils plugin makes it easier for you to write code from the user's browser.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.


Return to Web Development

Who is online

Users browsing this forum: No registered users and 4 guests

cron