Hi I have the following code. I am trying to figure out how to get test_xml= xmlEditor.getXmlAsString(); line into a coldfusion variable from this script.
I have tried.
<cfset myXML = qQuery[test_xml]>
This returns nothing. Here is the raw script below. Can anyone tell me what I am missing.
//get output xml from edited
$('#xml_output').click(function() {
try {
test_xml= xmlEditor.getXmlAsString();
//file_xml= xmlEditor.W
//test_xml1= encodeURI(test_xml).replace(/%5B/g, '[').replace(/%5D/g, ']');
//GLR.messenger.show({msg:"Generating file...", mode:"loading"});
//GLR.messenger.inform({msg:"File saved Successfully.", mode:"success"});
$('.final_area').val(test_xml);
$('.final_xml').css('display','block');
} catch(e) {
GLR.messenger.show({msg:"Something went wrong, Please try again later....",mode:"error"});
}
});
If you are trying to get a variable back to coldfusion from javascript, you are going to need to look into something like AJAX.
You could use something like this to send the variable to a cfm page:
This would sent the
jsvariablevariable back to the coldfusion page, where you could return what you wanted to, what is returned would be in thedatavariable.