Adobe Dreamweaver Forums



Last 10 THreads :         Recommend Reading? (Last Post : anpuofeck - Replies : 5 - Views : 7 )           »          static sound (Last Post : kglad - Replies : 15 - Views : 16 )           »          Detect multiple areas of transparency in an image? (Last Post : Rothrock - Replies : 8 - Views : 9 )           »          Add a full screen button to a video. (Last Post : kglad - Replies : 5 - Views : 9 )           »          Problems when uploading my website (Last Post : speculumcm - Replies : 4 - Views : 5 )           »          Dreamweaver CS3 Download (Last Post : DWFAQ.info - Replies : 5 - Views : 6 )           »          Pop up window using AS3 (Last Post : azilen - Replies : 0 - Views : 1 )           »          flash movie plays prematurely (Last Post : lyshamo - Replies : 5 - Views : 6 )           »          Variable for Loader Content (Last Post : kglad - Replies : 5 - Views : 6 )           »          Sick flash (Last Post : edmond_dantes - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Cold Fusion > Getting Started
 
Tags:



Reply
  #1 (permalink)  
Old 11-24-2008, 07:16 AM
wmanu
 
Posts: n/a
Diggs:
Default SPRY in SPRY

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.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-01-2008, 07:51 PM
pflynn02
 
Posts: n/a
Diggs:
Default Re: SPRY in SPRY

Not sure but does your Page1 need to be a .cfm page in order to call that CFC?
Reply With Quote
  #3 (permalink)  
Old 12-02-2008, 10:16 PM
Jedi Master
 
Posts: n/a
Diggs:
Default Re: SPRY in SPRY

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.

Reply With Quote


  #4 (permalink)  
Old 12-09-2008, 05:23 PM
cehret cehret is offline
Junior Member
 
Join Date: Dec 2008
Posts: 1
Diggs: 0
Default

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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:40 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk