Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Ajax and XML related problem

Ajax and XML related problem

Scheduled Pinned Locked Moved XML / XSL
databasehelpquestionphpxml
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Y_Kaushik
    wrote on last edited by
    #1

    Hello all's I am new in ajax and XML.When any form data is saved using ajax ( without page refresh ) Then the function return xml ... How can i do this can any one help me my code is written below. function ajaxFunction(sText) { var ajaxRequest; // The variable that makes Ajax possible! try { // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e) { // Internet Explorer Browsers try { ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser browser is not compitable for the page on which you are working!"); return false; } } } var device_type_name = document.getElementById('device_type_name').value; var reporting_interval = document.getElementById('reporting_interval').value; var module = document.getElementById('module').value; var version = document.getElementById('version').value; var s_key = document.getElementById('s_key').value; var uid = document.getElementById('uid').value; var lang = document.getElementById('lang').value; // This query string is for direct call using class //var strUrl = '?device_type_name='+device_type_name+'&reporting_interval='+reporting_interval; // This query string is for API call var strUrl = '?device_type_name='+device_type_name+'&reporting_interval='+reporting_interval+'&module='+module+'&version='+version+'&s_key='+s_key+'&uid='+uid+'&lang='+lang; ajaxRequest.open("GET", "api/index.php" + strUrl,onResponse,true); ajaxRequest.send(null); // AjaxRequest.get( // { // 'url':'strUrl','onSuccess':function(){ alert('Success!'); // }} // ); // var ajax = new Ajax(); // ajax.makeRequest('GET', 'api/index.php', onResponse); //blank all field for new entry document.getElementById('device_type_name').value=''; document.getElementById('reporting_interval').value=''; ///////// function onResponse() { if(ajax.checkRea</x-turndown>

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups