Hi there, first time posting!
I'm using RL-ARM 4.12 release.
I've used to follow the official guide (http://www.keil.com/product/brochures/rl-arm_gs.pdf).
At page 77 you may find an AJAX example. Here is a snippet from the example where you open the connection with the server
xmlHttp = GetXmlHttpObject(); if(xmlHttp == null) { alert("XmlHttp not initialized!"); return 0; } xmlHttp.onreadystatechange = responseHandler; xmlHttp.open("GET", formUpd.url, true, userName, userPassword); xmlHttp.send(null);
the GetXmlHttpObject() function is shown below:
function GetXmlHttpObject() { //init XMLHttp object var xmlHttp=null; try { xmlHttp=new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari } catch (e) { try { // Internet Explorer xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; }
Now, this works fine for a page update but I need to send data to the server, not only to update the page.
I'm looking for AJAX since I want to avoid a page refresh that I can't avoid using a simple FORM.
So my question is: How can I send data to my RL-ARM 4.12 with AJAX? Any example available online? Any tutorials? Perhaps is there a simple way to do it using the
xmlHttp.send();
function?
Any help would be appreciated!
Thank you
Paolo.