| Subject: | Re: Javascript + CF XML Integration |
|---|---|
| From: | "freedomflyer" <webforumsuser@xxxxxxxxxxxxxx> |
| Date: | Mon, 28 Jul 2008 18:58:30 +0000 (UTC) |
| Newsgroups: | macromedia.coldfusion.getting_started |
Ok---
I've listed my (unworking, as it were...) code below.
I am still fairly in the dark. Defining the "Document" is where I kind of get
stuck. I am sorry for the annoyance :) I'm just not quite understanding the
entire process. I'm just trying to get some predefined data from the .cfm page
before I do anything else with GET or POST vars.
Your continued help is much appreciated.
********.cfm page*******
<cfset myxml =
'
<name>
<first>
RANDOMFIRSTNAME
</first>
</name>
'
>
<cfcontent type = "text/xml" variable="myxml">
*****.html page w/ JS******
<html>
<body>
<script>
submitData = function(){
xmlobj = new XMLHttpRequest();
xmlobj.onreadystatechange = function(){
if(xmlobj.readyState ==4){
var
xmlDoc=document.implementation.createDocument("","",null);
var xyz =
xmlDoc.childNodes[0].getElementsByTagName("first")[0].firstChild.nodeValue;
document.getElementById("divver").innerHTML = xyz;
}
}
xmlobj.open("GET","cfxml.cfm",true);
xmlobj.send(null);
}
</script>
<label>
<input type="submit" name="Submit" value="Submit" onClick="submitData();">
</label><div id="divver">VALU</div>
</body>
</html>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Javascript + CF XML Integration, coffeedrinker56 |
|---|---|
| Next by Date: | Re: Logging out issues, BKBK |
| Previous by Thread: | Re: Javascript + CF XML Integration, coffeedrinker56 |
| Next by Thread: | ORA-03113 Please help, wolf_lady |
| Indexes: | [Date] [Thread] [Top] [All Lists] |