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:
japanese characters (1997)
[Fwd: Rotating Banners ... (was LinkExchange)] (1997)
Cart Creation (2003)
Generating unique SKU from [cart] - Still Stumped... (1997)
[OT] installing binary app (2006)
Using Plug-In while running 1.6.1 (1997)
Feature Request: DB Field manipulation (1998)
[WebDNA] how to override webdna's built-in tags? (2010)
ListFiles bug v3.0 OSX (2000)
[lookup] again... (2003)
Nav. 4 probs with cart - Serious problem (1997)
[WebDNA] TCP HTTP/1.1 questions (2011)
Converting Quotes in Javascript (2001)
Case sensitivity and [showif] (1999)
Personal Web Server combined with Webcatalog 2.1 (1998)
RAM variables (1997)
suggestions for a good text editor on windows? (2005)
[WebDNA] WebDNA 8.6 announced - New features (2018)
credit card question (simple) (2001)
WCS Newbie question (1997)