Skip to main content
Known Participant
November 24, 2008
Question

SPRY in SPRY

  • November 24, 2008
  • 3 replies
  • 427 views
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.
This topic has been closed for replies.

3 replies

cfjedimaster
Inspiring
December 2, 2008
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.
wmanuAuthor
Known Participant
December 2, 2008
Thanks for the response, will try and get back.
Inspiring
December 1, 2008
Not sure but does your Page1 need to be a .cfm page in order to call that CFC?