![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
Hi There,
I?m trying to make use of SPRY in my Coldfusion application. My first trial was successful. But I?m having some issues when I dig deep. Let me explain the situation: I?m having three pages: Default.html, Page1.html, Content.cfc 1.Content.cfc has the coldfusion 2.Default.html calls Page1.html using Spry.Utils.loadURL 3.Page1.html calls Content.cfc through Spry.Data.XMLDataSet and spry:region for loading data dynamically If I execute Content.cfc directly through browser, I?m getting expected result. But when I call the same through Spry.Utils.loadURL, the spry region is not getting loaded. I?m getting {VARIABLENAME} instead of values. So which means SPRY is not getting executed. Does anyone have a solution to this problem? Many thanks / Manu. |
| Sponsored Links |
|
|||
|
I don't think your problem is CF related. If you use Ajax in page 1 to load
content into a div, and that content itself has JavaScript, then there are certain rules you have to follow in order for the JS to be executed. Any code that uses this form: function foo() will not work. Instead if must be written as: foo = new function() { What I'd recommend is making Page1.html no do any Spry at first, but simply do call a function that does an alert. Once you get that working, you can then move from there. |
|
|||
|
Hi Manu,
I had the same problem and found the following solution: var ds1 = new Spry.Data.XMLDataSet(null,null,{useCache:false, method: "POST"}); function triggerClick(){ Spry.Utils.loadURL("POST", "some.xml", true, MySuccessCallback, {headers: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}); ds1.setURL("another.xml", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" }}); ds1.setXPath("documents/document"); ds1.loadData(); } function MySuccessCallback(req){ var result = req.xhRequest.responseText; document.getElementById("MyArea").innerHTML = result; Spry.Data.initRegions(); TabbedPanels1.showPanel(1); } perhaps that helps you or someone else with the same problem! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise