Re: [WebDNA] WebDNA jQuery JSON javascript stuff
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 105073
interpreted = N
texte =
In my work in cooking up AJAX webDNAstuff, I've discovered that we can't use JQuery for some of it. You'll ha=ve to use javascript directly. That might helpyou resolve this. One of the pieces in my set is an autosuggest, and I ha=ve it working fine, but not with JQuery. Thatbreaks it. Has to do with the ResponseXML vs. ResponseText that Donovan m=entions.
On Wed, 17 Mar 201023:46:02 -0500
Donovan Brooke <dbrooke@euca.us> wrote:
> =Diane Blackmore (Cohesion) wrote:
>>Hi
> [snip]
>> Basically, can anyone tell me how I can get= the data
>>back in the JSON
>> format it needs, without the extra WebDNA stuff that it
=>>doesn=92t need.
>>
>>
>> Thanks heaps if you can help,
>
>
> Usin=g WebDNA's [function] and [return]contexts
> are a good way to return only what you want returned.
> Also, the <!--HAS_WEBDNA_TAGS-->can reside within
>[!][/!]
> tags... which can also prevent =them from being
>displayed.
>
> so:-----------
> [!]<!--HAS_WEBDNA_TAGS-->[/!][!]
> [/!][function name=3DsomeFname]
>
> <whitespace>
>
> [search..blah][return][found=items][blah][/founditems][/return][/search]
>
> <morewhitespace>
>
> [/function][someFname]> --------------
>
> May workfor you.
>
>
> Regarding JSON.. I don't think Chris i=s planning on
>worrying about
>this anytime soon (because of other pressing
>priorities).. but si=nce
> JSON is just a format (such as XML)any one of us could
>write a function
> lib to encode/decode= for JSON.. perhaps from encoding
>fromfounditems,
> or an array etc??
>
> http://www.json.or=g/
>
> There are 3 very importantdata exchange formats that
>standard AJAX snippets will use.. text=(string), XML, and
>JSON... so it wouldbe
> good for us to have a JSON encode/decode util. to work
>=;with.
>
> Right now, 6.x (atleast on the apache builds).. doesn't
>work with
> XML ajax =snippets because you can't over-ride the
>content-type to a value of text/html... try it yourself:
> =
> in a template have the code:
>
> <!--HAS_WEBDNA_TAGS-->
> [setmimeheader name=3Dconte=nt-type&value=3Dtext/XML]
>
> thenhit the page with a mime header viewer of some kind
>(firefox has<=br>> a mimeheaders plug-in forexample).
>
> Anyway, the AJAX object 'responseXML' requires= the XML
>content-type..
> soWebDNA (at least the apache 2.x builds) do not
>currently work
=> with AJAX snippets that make use of the'responseXML'
>component.
>
> I brought this up with =Chris.. and we discovered that
>thiswill
> work with the up coming fastCGI app.. but Chris will
>=;have to decide
> if he wants to addressit for the module version.
>
> I am guessing the problem res=ides in the open source
>WebDNAapache
> module, and I'm also guessing it is a simple fix.
> =
> Anyway.. that's what I know aboutWebDNA and AJAX right
>now.
>
> My suggestion for any=one that is looking around for AJAX
>snippets
> is to look for the "responseText" object and don='t use
>snippets
> that containthe 'responseXML' object for now. With
>'responseText',
> yo=u should be able to easily integrate withWebDNA..
>however,
> there are sure reasons to use XML... he=re
> is some more info about all ofthis:
>
> http://www.developer.com/xml/article.php/3596836/S=peeding-Up-AJAX-with-JSON
>
>Cheers,
> Donovan
>
>
>
>
> -- > Donovan Brooke
> Euca DesignCenter
> [Practical-Ethical-Efficient]
> www.euca.us
> =egg.bz
> artglass-forum.com
>---------------------------------------------------------
> This me=ssage is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us>.
> To un=subscribe, E-mail to:<talk-leave@webdna.us>
> archives: http://mail.webdna.us/list=/talk@webdna.us
> old archives:http://dev.webdna.us/TalkListArchive/
> Bug Reporting:
>http=://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288
=A0=
Associated Messages, from the most recent to the oldest:
In my work in cooking up AJAX webDNAstuff, I've discovered that we can't use JQuery for some of it. You'll ha=ve to use javascript directly. That might helpyou resolve this. One of the pieces in my set is an autosuggest, and I ha=ve it working fine, but not with JQuery. Thatbreaks it. Has to do with the ResponseXML vs. ResponseText that Donovan m=entions.
On Wed, 17 Mar 201023:46:02 -0500
Donovan Brooke <dbrooke@euca.us> wrote:
> =Diane Blackmore (Cohesion) wrote:
>>Hi
> [snip]
>> Basically, can anyone tell me how I can get= the data
>>back in the JSON
>> format it needs, without the extra WebDNA stuff that it
=>>doesn=92t need.
>>
>>
>> Thanks heaps if you can help,
>
>
> Usin=g WebDNA's
[function] and
[return]contexts
> are a good way to return only what you want returned.
> Also, the <!--HAS_WEBDNA_TAGS-->can reside within
>
[!][/!]
> tags... which can also prevent =them from being
>displayed.
>
> so:-----------
>
[!]<!--HAS_WEBDNA_TAGS-->[/!]
[!]> [/!][function name=3DsomeFname]
>
> <whitespace>
>
> [search..blah]
[return][found=items][blah][/founditems][/return][/search]
>
> <morewhitespace>
>
> [/function][someFname]
> --------------
>
> May workfor you.
>
>
> Regarding JSON.. I don't think Chris i=s planning on
>worrying about
>this anytime soon (because of other pressing
>priorities).. but si=nce
> JSON is just a format (such as XML)any one of us could
>write a function
> lib to encode/decode= for JSON.. perhaps from encoding
>fromfounditems,
> or an array etc??
>
> http://www.json.or=g/
>
> There are 3 very importantdata exchange formats that
>standard AJAX snippets will use.. text=(string), XML, and
>JSON... so it wouldbe
> good for us to have a JSON encode/decode util. to work
>=;with.
>
> Right now, 6.x (atleast on the apache builds).. doesn't
>work with
> XML ajax =snippets because you can't over-ride the
>content-type to a value of text/html... try it yourself:
> =
> in a template have the code:
>
> <!--HAS_WEBDNA_TAGS-->
> [setmimeheader name=3Dconte=nt-type&value=3Dtext/XML]
>
> thenhit the page with a mime header viewer of some kind
>(firefox has<=br>> a mimeheaders plug-in forexample).
>
> Anyway, the AJAX object 'responseXML' requires= the XML
>content-type..
> soWebDNA (at least the apache 2.x builds) do not
>currently work
=> with AJAX snippets that make use of the'responseXML'
>component.
>
> I brought this up with =Chris.. and we discovered that
>thiswill
> work with the up coming fastCGI app.. but Chris will
>=;have to decide
> if he wants to addressit for the module version.
>
> I am guessing the problem res=ides in the open source
>WebDNAapache
> module, and I'm also guessing it is a simple fix.
> =
> Anyway.. that's what I know aboutWebDNA and AJAX right
>now.
>
> My suggestion for any=one that is looking around for AJAX
>snippets
> is to look for the "responseText" object and don='t use
>snippets
> that containthe 'responseXML' object for now. With
>'responseText',
> yo=u should be able to easily integrate withWebDNA..
>however,
> there are sure reasons to use XML... he=re
> is some more info about all ofthis:
>
> http://www.developer.com/xml/article.php/3596836/S=peeding-Up-AJAX-with-JSON
>
>Cheers,
> Donovan
>
>
>
>
> -- > Donovan Brooke
> Euca DesignCenter
> [Practical-Ethical-Efficient]
> www.euca.us
> =egg.bz
> artglass-forum.com
>---------------------------------------------------------
> This me=ssage is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us>.
> To un=subscribe, E-mail to:<talk-leave@webdna.us>
> archives: http://mail.webdna.us/list=/talk@webdna.us
> old archives:http://dev.webdna.us/TalkListArchive/
> Bug Reporting:
>http=://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288
=A0=
"Terry Wilson"
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Include a big block of text (1997)
HELP WITH DATES (1997)
WebCat b13 CGI -shownext- (1997)
Error Log.db --however (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
WebMerchant 3.0 for Mac shipping now (1998)
WebCat2b12 - nesting [tags] (1997)
time + (1998)
Emailer (WebCat2) (1997)
WebCat & WebTen (1997)
SiteEdit Pro Update Announcement (1997)
Maybe Off Topic -- OS X/UNIX Shell Scripts? (2003)
[WebDNA] upgrading to 8.1 or 8.2? (2016)
Digital Postcards (1999)
WebDNA quitting (2008)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
RE: Emailer prefs in two places ... (1997)
Hiding Contexts (2000)
Help! WebCat2 bug (1997)
Error:Too many nested [xxx] contexts (1997)