# HG changeset patch # User paulb # Date 1115144275 0 # Node ID 0a1bac60dc72efa8eb2f9d80a60b33113e47218a # Parent ddfd6394614b18cc68a504f2d8949e2a93854447 [project @ 2005-05-03 18:17:46 by paulb] Changed requestUpdate to use a field name instead of an element identifier which really wasn't needed before. Now, the field name and value are sent to the application, and the identified element in the response is used to replace the identified element in the existing document, where the identifier is the same for both documents. diff -r ddfd6394614b -r 0a1bac60dc72 examples/Common/Configurator/Resources/config_template.xhtml --- a/examples/Common/Configurator/Resources/config_template.xhtml Tue May 03 18:14:34 2005 +0000 +++ b/examples/Common/Configurator/Resources/config_template.xhtml Tue May 03 18:17:55 2005 +0000 @@ -20,7 +20,7 @@

Base System

Model - diff -r ddfd6394614b -r 0a1bac60dc72 examples/Common/Configurator/Resources/scripts/XSLForms.js --- a/examples/Common/Configurator/Resources/scripts/XSLForms.js Tue May 03 18:14:34 2005 +0000 +++ b/examples/Common/Configurator/Resources/scripts/XSLForms.js Tue May 03 18:17:55 2005 +0000 @@ -1,13 +1,15 @@ -function requestUpdate(url, elementName, targetName) { +function requestUpdate(url, fieldName, targetName) { var xmlhttp = Sarissa.getXmlHttpRequest(); - xmlhttp.open("GET", url, false); - xmlhttp.send(null); + xmlhttp.open("POST", url, false); + var fieldValue = document.getElementsByName(fieldName)[0].value; + //alert(fieldValue); + xmlhttp.send(fieldName + "=" + fieldValue); //alert(xmlhttp.status); //alert(xmlhttp.responseText); var newDocument = Sarissa.getDomDocument(); newDocument.loadXML(xmlhttp.responseText); //alert(newDocument); - var newElement = newDocument.getElementById(elementName); + var newElement = newDocument.getElementById(targetName); var targetElement = document.getElementById(targetName); //alert(newElement); //alert(targetElement);