Web Connection
XHR Send & Return
Gravatar is a globally recognized avatar based on your email address. XHR Send & Return
  Juan Brie
  All
  Sep 26, 2020 @ 09:22am

Hi Rick! I'm attempting to work with XMLHttpRequest. I send a FormData from HTML with a code as this:

var formulario=document.querySelector(form[name='Form01']);
var datos= new FormData(formulario);
var url='JBUPDATE.jb';
var solicitud= new XMLHttpRequest();
solicitud.addEventListener('load',verResultado);
solicitud.open('GET',url,false);
solicitud.send(datos);

JBUPDATE is the function's name added to the WWC_RESTPROCESS object. jb is the scriptmap registered in REST generation. But ALLWAYS returns a 404 Error (Can't load resource or something so)

First Question: Where can be the problems? JBUPDATE function makes a few validations and only ONE replace ! I have added a messagebox at beginnig but it doesn't appear. It seems as VFP coudn't find JBUPDATE2 function. Second Question: JBUPDATE, after Replace, explicitely returns NOTHING to Web Server. Should it to send something ?

Thanks. JBrie.

Gravatar is a globally recognized avatar based on your email address. re: XHR Send & Return
  Rick Strahl
  Juan Brie
  Sep 26, 2020 @ 02:48pm

Please reformat your code in the message and re-post (you can edit the message)...

+++ Rick ---

© 1996-2020