Asynch JSON in Spry (Dw CS3)
I've got sites/pages that I'd like to have load data
asynchronously;
after
the HTML document has loaded and the document object is
closed. (Much like what is done with auto-suggest examples that
access Yahoo or Amazon via the XMLHttpRequest object.) The sites I
manage usually have a
www.domain.com that serves static HTML content and a
data.domain.com that serves dynamic content (as data)
so, I'd like to use JSON as the data delivery method so as to avoid
the cross-domain issues associated with the XMLHttpRequest object.
Does Spry framework (as bundled with Dw CS3) support such
"asynchronous" JSON?
I don't know if you will have access to this because it's
still in test:
http://cinvmos10d:41031/Pages/sprytest.aspx
Thanks
Similar Messages
-
How do you generate random data info using json and spry?
I have a mobile applicaton that uses spry datasets that dynamically populate a jquery mobile listview by using a json file. Everything is operating as it should.
However, I would like to understand how to pull random objects from the json file to have them displayed on a different page.
My json file is standard and not complicated. It has several levels. Each is represented as below:
{ "Level1":
{"imageurl":"images/_myimage.png",
"someData":"S,A,P,R",
"levelLongDesc":"further description",
"name": "John Doe",
"page": "referencepage",
"description":"The description of the image"
{"imageurl":"images/_myimage.png",
"someData":"S,A,P,R",
"levelLongDesc":"further description",
"name": "John Doe",
"page": "referencepage",
"description":"The description of the image"
Json file Level1 has about 70 objects
What I would like to do is randomly load one of the Level1 object arrays into the page when the user selects a Level 1 radio button that is on the screen. I know how to create the page, radio buttons and basics, but just don't know how to pull in the random data.
I've found one code sample on this site that speaks to spry and xml, but I haven't been able to apply it in any way that works for me with the json file:
http://forums.adobe.com/message/662551
I've also googled. There isn't much on spry datasets with json and generating random info. There was a little bit on sorting, but that didn't help either.
Does anyone have a good example/tutorial of how to use the random function with spry/json?
TIA
-RachelI've done similar things before. A few thoughts for you:
1. I'm assuming you're doing a buffered period or frequency measurement on the incoming encoder pulses, right? First key point is that you'll have data that is spaced equally in position, but not equally in time. If you are looking for a time-based FFT such that increasing speed will shift your spectrum, you're going to need to go through an interpolation process to resample your data as though equally-spaced in in time.
2. Your 149 pulse per rev encoder may be a significant source of error unless its 149 pulses are placed with extreme accuracy. Any error in pulse placement violates your underlying assumption of data that is equally-spaced in position. It'll be very helpful to send your data through a software lowpass filter to attenuate those artifacts.
3. I am not sure what you mean by "decompose the buffered data (array) into a single datastream." You'll get an array of periods / frequencies from the call to DAQmx Read. If you want to use it in a LabVIEW waveform datatype, you'll first need to do the resampling to create equally-spaced-in-time data. The LabVIEW waveform datatype (and all the analysis functions like FFT that use it) depend on receiving data with a fixed constant time interval between samples.
-Kevin P. -
Problems with tabbed panels in Spry/DW CS3
Hi,
When I preview tabbed panels in IE (right now 7) the tab will
close and then give a split-second "flash of content" before
closing, is this a bug?? I have installed the Spry 1.61 updater
unless I have installed the updater incorrectly...thanks.I don't know if you will have access to this because it's
still in test:
http://cinvmos10d:41031/Pages/sprytest.aspx
Thanks -
Multiple Spry Widgets not functional on one page
I've installed 3 Spry widgets (CS3) & have run into the documented issue where they don't all work together on the page. Below is a link to my testing page, can anyone tell me where the problem lies? Are these browser issues?
Thanks!
http://www.designscrespo.com/widget_testStart by validating the code.
That page is riddled with errors, including a missing opening <body> tag.
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.designscrespo.com%2Fwidget_test&charset =%28detect+automatically%29&doctype=Inline&group=0 -
Spry Horizontal Navigation Bar
A horizontal navigation bar was created using Spry in CS3.
The navigation bar needs to be lengthened.
Does anyone know how to lengthen it so it spreads across the
page?Hello,
Can you post an URL?
It's easier to tell you exactly what you might need to do.
For example, it's a bit different if the nav bar is in a
container with a
width or not contained.
Take care,
Tim
"Karen L." <[email protected]> wrote in
message
news:fsjtmm$3ea$[email protected]..
>A horizontal navigation bar was created using Spry in
CS3. The navigation
>bar needs to be lengthened.
> Does anyone know how to lengthen it so it spreads across
the page? -
DW CS3 slows to crawl every few minutes
Every few minutes as I am using Dreamweaver CS3 (under Vista
SP1), the program becomes unresponsive and my processor maxes out
(the Task Manager shows DW as hogging the CPU). I wait for what
seems like minutes -- but is probably only a few seconds -- and I
get control again. It happens repeatedly but I have not timed the
intervals between them to see if it is a consistent time. It seems
as thought Dreamweaver is busy doing something but, for the life of
me, I don't know what as it happens regardless if I've made any
changes to files or not -- it happens if I just sit there and watch
it. Anyone else have this problem? GordThis problem has plagued me since CS3's release. I have three
different
workstations, two on XP Pro and another with Vista and it's
the same
regardless. If you google for "dreamweaver cs3 slow" you will
find lots of
hits, especially with Macs, however I don't have a mac. There
is a KB
document that tries to blame your antivirus for scanning all
the .js files
that Dreamweaver uses making it slow, however, excluding
those files from my
resident scanner never changes anything. Also, Dreamweaver 8
runs like a
champ and I continue to use that on each of my workstations.
I feel rather cheated since I was really wanting to
experiment with SPRY on
CS3, however, since CS3 is such a dog, I have never had the
chance. Now I'm
looking at alternative AJAX libraries and Aptana instead.
Also, they got my
agency's money already for 5 licenses of CS3, but I never
OK'd it for use by
the rest of the web team so everyone remains on version 8.0
for now and I'm
currently evaluating CF Eclipse as an alternative. The only
thing that was
holding me back before was I occasional use the GUI layout in
DW but Eclipse
3.4 has added that feature. I'd have stayed with DW if only
CS3 worked.
"mb1870" <[email protected]> wrote in
message
news:g3cpii$qd3$[email protected]..
> Every few minutes as I am using Dreamweaver CS3 (under
Vista SP1), the
> program
> becomes unresponsive and my processor maxes out (the
Task Manager shows DW
> as
> hogging the CPU). I wait for what seems like minutes --
but is probably
> only a
> few seconds -- and I get control again. It happens
repeatedly but I have
> not
> timed the intervals between them to see if it is a
consistent time. It
> seems as
> thought Dreamweaver is busy doing something but, for the
life of me, I
> don't
> know what as it happens regardless if I've made any
changes to files or
> not --
> it happens if I just sit there and watch it. Anyone else
have this
> problem? Gord
> -
I'm using Spry in CS3 along with FileMaker as the databse where I want to store data that is built in a Spry framework. Does anyone know if it is possible to stuff data into FileMaker from Spry? And if so, how ??
dm225Yes Spry and FileMaker Play very well together, both of my websites are driven by FileMaker 10 and Adobe Spry.
There is a complete FileMaker API for PHP. You do need to have the FileMaker files hosted by FileMaker Server.
Get the file from my 2008 Presentation on FileMaker and Adobe Spry off my site http://apphiasolutions.com/downloads.php
It contains a complete sample cms solution with the powerpoint.
If you need more info contact me directly.
Joe
Apphia Solutions, LLC
[email protected]
http://apphiasolutions.com -
Best practices for submitting CF data to an AJAX page?
Hi everyone,
I've got a project I'm working on for work and have hit a
little problem.
I am extracting data from my database and then after each
piece of data (just numbers, usually 10 chunks of numbers), I tack
a "|" onto the end of each number. Then, I output the data to the
page. Back on my AJAX enabled page, I get the "responseText" from
that page, and then split it up using javascript and the
pre-inserted "|".
This seems to work fine, but it is quite a bit more messy.
Also, It would really, really be nice to be able to do sorting and
various other operations on the data with javascript instead of
having to rely on CF's icky code logic.
Can someone please enlighten me as to best practices for this
type of thing? I get the suspicion that I'll probably be using XML
somehow, but I'd your opinion.
Thanks!Check out the Samples and Documentation portions of Adobe's
Spry website for client side use of JSON with Spry.
http://labs.adobe.com/technologies/spry/home.html
Here is link to Adobe's Spry Forums:
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602
If you are using CF8 you can use the SerializeJSON function
to convert a variable to JSON. You might also be interested in the
cfsprydataset tag. CF 8 documentation:
http://livedocs.adobe.com/coldfusion/8/htmldocs/
If you are using a previous version of CF there is 3rd party
JSON support. You can find links at
http://json.org. -
JSONDataSet can't work in firefox
I found that the JSONDataSet can't work in firefox, but in IE
/Saiferi is all right.
I Get the json data from a local file , and run the local
html in firefox.
var dsStates = new Spry.Data.JSONDataSet("data/bug.json")
<div spry:region="dsStates">
<table >
<tr>
<td >title</td>
</tr>
<tr spry:repeat="dsStates">
<td>{title}</td>
</tr>
</table>
</div>
But none data display
what can i do?here is a mini demo, which can diaplay normally in IE but
firefox
you must install python & webpy runtime before run it
you can get them from www.python.org and www.webpy.org
get the code here:
http://exs.mail.foxmail.com/cgi-bin/downloadfilepart?svrid=1&fid=9cfa67b8e07b9fd637891cb29 630e7b5f77d9626607770bf&&txf_fid=&&txf_sid=&fn=spry_issues_demo.zip
and then run python query.py first
the put the index.html into firefox
thx -
Submenus not transparent in IE
I need transparent submenus ... I'm using spry in CS3. It
works fine in FF, however in IE7 the background is white. It
appears the iframe hack built into the spryhorizontalmenu.css file
is causing a problem in IE7. Help.Never mind. Adding the width specification to ul.MenuBarHorizontal ul did the trick. I don't know why it worked ok in every other browser, but not in IE, other than IE breaks things on a regular basis and sometimes I swear there is some evil person at M$ who delights in confounding web designers.
-
ATTN: CS5.5 Introduced
In case you didn't know...
http://adobe.ly/dR5sirIain71 wrote:
I've just seen this too.
The thing that really caught my eye in DW 5.5, as someone who is hopefully pretty decent by now at building websites, but not from a coding background were:
jQuery Mobile Integration and PhoneGap, here:
http://www.adobe.com/products/dreamweaver.html
In my time I have worked through some iOS development tutorial books - the Apres Learn Objective C and Learn iOS development books - but because I don't come from a coding background, did find it a bit of a struggle.
But from looking at the above, it kinda looked as though you could design and build apps in from within DW - am I getting that right?
Now obviously there's a lot more to it, and like a lot of this stuff a clear advantage if you do come from a coding background, but I'd certainly be interested in having a look at it again in an environment I'm a lot more comfortable and familiar with.
While I agree with your comments about PhoneGap that does have some interest, the JQuery additions put into question the future of Spry. Is Adobe making the investment in JQuery and retiring Spry? To be honest, I do prefer JQuery's animation tools, but for data handling I have grown accustomed to Spry since CS3. But when it comes to iOS development I currently have a choice between XCode which is free for $99/year with an Apple Developer Membership or $4.99 without in the App Store vs $399 for a suite from Adobe. Unfortunately the Mac tool on the Mac development wins out.
And the programs in the Design Suite that seemed to have been upgraded by 5.5 were:
Dreamweaver
InDesign
Flash Pro
Flash Catalyst
Device Central
What happened to all the beta HTML5 tools that were in Illustrator? What about Fireworks? And while the InDesign looks very interesting and tempting, it still scares me to read this:
Articles panel
Control the sequence of text, images, and graphics when you export to EPUB or HTML without changing your InDesign layout. Organize your content by dragging it into the new Articles panel to define the export order.
http://www.adobe.com/products/indesign/features._sl_id-contentfilter_sl_features+by+versio n_sl_new+since+cs5.html
Haven't we learned anything from Word exporting HTML, then Photoshop exporting HTML and now we want to give InDesign a try.....Why???? -
Just been reading the Edge newsletter for June, and picked up
on this under the section describing Ajax features in DW CS3:
Adobe say-
"Because Spry lives independently on Adobe Labs, it will
continue to evolve and become more robust and powerful. Upcoming
releases will include JavaScript Object Notation (JSON) support,
unobtrusive JavaScript support, HTML datasets, and more."
With each stable release of Spry, is there going to be an
update for DW to expand the functionality within the software, for
instance, update the Spry toolbar to contain buttons for new
features etc?Yep - that's the ticket....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Al Sparber- PVII" <[email protected]> wrote in
message
news:f568nl$ha1$[email protected]..
> "Murray *ACE*" <[email protected]>
wrote in message
> news:f56612$e0c$[email protected]..
>> Make it a server-side include. Remember that the
parent page must have
>> the links to the CSS files, and the javascript
files, NOT the include
>> file.
>
> Even though this is part of the Pop Menu Magic user
guide, the theory
> would be the same for the Spry menu (without the
automation features):
>
http://www.projectseven.com/products/menusystems/pmm/user_guide/site_wide/includes/index.h tm
>
>
> --
> Al Sparber - PVII
>
http://www.projectseven.com
> Extending Dreamweaver - Nav Systems | Galleries |
Widgets
> Authors: "42nd Street: Mastering the Art of CSS Design"
>
> -
pleases Help!
I am trying to get a basic example working using spry and
JSON and i keep getting the following errors:
Spry.Data.HTTPSourceDataSet has no properties
Spry.Data.HTTPSourceDataSet has no properties
I am trying to get my json data from a cfc like this
var dsEmployees = new
Spry.Data.JSONDataSet("./model/CS3/Employee.cfc?method=getAllEmployees",{path:"employeeLi st"});
What am i doing wrong?
Thank youActually it is the first java file include...
Below is my code
dsp_MasterDetail.cfm
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:spry="
http://ns.adobe.com/spry/">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
<script language="JavaScript"
src="./SpryAssets/SpryData.js"
type="text/javascript"></script>
<script language="JavaScript"
src="./SpryAssets/SpryEffects.js"
type="text/javascript"></script>
<script language="JavaScript"
src="./SpryAssets/SpryJSONDataSet.js"
type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
var dsEmployees = new
Spry.Data.JSONDataSet("./model/CS3/Employee.cfc?method=getAllEmployees",{path:"employeeLi st"});
//-->
</script>
<style type="text/css">
<!--
.selected {
background-color: #0099FF;
.hover {
background-color: #FFFFCC;
.even {
background-color: #CCCCCC;
.style1 {
font-size: large;
font-weight: bold;
-->
</style>
</head>
<body>
<table border="1">
<tr>
<td>
<div spry:region="dsEmployees">
<div spry:state="loading">Loading employee data <br
/><img src="ajax-loader.gif" /></div>
<div spry:state="error">An error occured loading your
dataset.</div>
<div spry:state="ready" style="height:200px;
width:200px;overflow:auto;">
<table border="1" >
<tr>
<th spry:sort="FullName">Employee</th>
</tr>
<tr spry:repeat="dsEmployees" spry:setrow="dsEmployees"
spry:hover="hover" spry:select="selected"
onClick="MM_effectAppearFade('Detail_DIV', 1000, 0, 100,
false)">
<td>{FULLNAME}</td>
</tr>
</table>
</div>
</div>
</td>
<td valign="top">
<div align="left" spry:region="dsEmployees"
spry:state="ready"
id="details"><strong>Details</strong><br
/><hr align="left" width="75"/></div>
<div id="Detail_DIV" spry:detailregion="dsEmployees">
<table id="Detail_Table" border="0" width="50%">
<tr>
<th>NT_ID</th><td>{NT_ID}</td>
</tr>
<tr>
<th>EMPLID</th><td>{EMPLID}</td>
</tr>
<tr>
<th>EMAIL</th><td>{EMAIL}</td>
</tr>
<tr>
<th>PHONE</th><td>{PHONE}</td>
</tr>
<tr>
<th>DEPTID</th><td>{DEPTID}</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
Employee.cfc
<cfcomponent displayName="employees" output="yes">
<cffunction name="getAllEmployees" access="remote"
output="yes">
<cfset var allPersons = queryNew("FullName, NT_ID,
EMPLID,EMAIL,PHONE,DEPTID") />
<cfset var toXML = "" />
<cfset var toJSON = "" />
<cfset var xmlQuery = "" />
<cfset var JSONQuery = "" />
<cfquery name="allPersons" datasource="cams_dev"
blockfactor="100">
SET CONCAT_NULL_YIELDS_NULL Off;
SELECT TOP 25 LAST_NAME + ', ' + FIRST_NAME AS FullName,
NT_ID, EMPLID, EMAIL, PHONE, DEPTID
FROM dbo.vwKscUsaPerson
ORDER BY LAST_NAME, FIRST_NAME
SET CONCAT_NULL_YIELDS_NULL On;
</cfquery>
<cfset JSONQuery =
application.toJSON.queryToJSON(allPersons, "employees")>
<cfsetting showdebugoutput="no">
<cfoutput><cfcontent type="text/html"
reset="true">#htmlcodeformat(JSONquery)#</cfoutput>
</cffunction>
</cfcomponent>
this cfc returns this json code
{"employees":[{"DEPTID":"014A420","EMAIL":"[email protected]","EMPLID":"025044","FULLNAME":"Aa dsen,
Ronald","NT_ID":"USATX\AadsenRP","PHONE":"123
456-7891"},{"DEPTID":"IDI-8011","EMAIL":"[email protected]","EMPLID":"KS997E7R","FULLNAME":"A aron,
Earnestine","NT_ID":"KSCBOC\AARONED","PHONE":"123
456-7891"},{"DEPTID":"IDI-KICS","EMAIL":"[email protected]","EMPLID":"KSANC4CD","FULLNAME":"A arts,
Bryan","NT_ID":"ICDNET\AartsBR","PHONE":"123
456-7891"},{"DEPTID":"0162230","EMAIL":"[email protected]","EMPLID":"011000","FULLNAME":"Abad ejos,
Ernesto","NT_ID":"USATX\abadejea","PHONE":"123
456-7891"},{"DEPTID":"0351480","EMAIL":"[email protected]","EMPLID":"004479","FULLNAME":"Abbe y,
David","NT_ID":"USAFL\ABBEYDA","PHONE":"123 456-7891"}]} -
Using Multiple Datasets and Spry in DW CS3
Hi there, I am currently trying to get an XML file pushed
into a HTML page by using Spry in Dreamweaver CS3.
However it uses three datasets. The schema is like this:
funds-and-headings
----> properties+
------------> region
------------> reference
------------> known-as
------------> funds+
---------------------> type
---------------------> heads+
-----------------------------> description
(where there is a + this means a heading)
but I am struggling to pull in the data.
If I highlight 'properties' I can pull in the first 3 records
but funds gives an 'unspecified' error message.
I just want to know how I can then pull in the other fields
all into one line and return all the results from the XML.
Any hlep most welcome and sorry if I missed anything out that
would help.Thought I'd drop a url so that my issue is more clear. :)
This is in Alpha, but a url would be:
http://center4spine.com.s11267.gridserver.com/how_we_help/spinal_decompression/
. You'll see the categories on the left; clicking a title changes
the content on the right. The first category's content is displayed
initially. I need to be able to link directly to the FAQ. How do I
get that page to show up with the FAQ loading first via a
hyperlink? I hope that's more clear! -
Hi folks,
I'm using the new Spry framework in DW CS3 to have a master
list of title that call up details on each title when clicked. My
client wants a fly out menu listing items A-K, and when "C" is
chosen he wants the page with the Spry data to display that section
of the data. I think what I'm asking is 'how do I trigger a certain
set of data to displayed in a web from a url. In the days of
Anchors that would be easy. How do I do it with Spry?Thought I'd drop a url so that my issue is more clear. :)
This is in Alpha, but a url would be:
http://center4spine.com.s11267.gridserver.com/how_we_help/spinal_decompression/
. You'll see the categories on the left; clicking a title changes
the content on the right. The first category's content is displayed
initially. I need to be able to link directly to the FAQ. How do I
get that page to show up with the FAQ loading first via a
hyperlink? I hope that's more clear!
Maybe you are looking for
-
I can't install Snow Leopard on MacBook after Tiger
hi everyone, i apologise if i created this topic on wrong discussion forum; i have a major problem -- there was 10.4.9 Tiger system on my MacBook. so i erased it to install new clean 10.6; i restarted my computer and during the installation there was
-
How do I add custom style to custom AS3 component via .css file?
Hi all, I have created a flex application which displays a custom component I created in actionscript. My custom component is just an extended canvas component which displays a gradient background. When I add the component to my flex app, see code be
-
Adobe Media Encoder CS6 が立ちあがらない
Adobe Media Encoder CS6 を立ち上げようとすると 「Adobe Media Encoder CS6 が予期しない理由で終了しました.」 と表示されて使う事ができません. 使用している機種は最新のmacbook Airです. OSは.10.9.5 です. どうぞよろしくお願いします.
-
Shazam not working on my MacBook Pro
I downloaded Shazam onto my Mid-2012 MacBook Pro, and it is running. However, it does not "spring to life" and recognize music at all. The songs I have tried are identified by Shazam on my iPhone, but on my Mac nothing happens. Anyone else have this
-
Sudo ipfw list open port?
So i did a "sudo ipfw list" in the terminal window and i got an open 63353 port. Naturally, I assumed that since my P2P software was just opened, and I said yes to the Leopard app firewall, it was this port number that was assigned to the P2P app. No