[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Handle-info] OpenHandle: JSONP Callback Parameter
Hi:
Well, after a little bit fiddling about I finally added in a "callback"
parameter [1] to the OpenHandle test service. (Note: I haven't yet uploaded
the new sources and .war files but will aim to do that as soon as.) Means
that with a smattering of JavaScript one can have handle values in the
browser.
So, calling the test service as
http://nascent.nature.com/openhandle/handle?&format=json&id=0.NA/0
yields the raw JSON object
{
"comment" : "OpenHandle (JSON) - see ...",
"handle" : "hdl:0.NA/0" ,
"handleValues" : [
...
]
}
while supplying a callback parameter [1] as
http://nascent.nature.com/openhandle/handle?&format=json&id=0.NA/0&callback=
yah-boo
yields a wrapped JSON object, e,g,
yah-boo(
{
"comment" : "OpenHandle (JSON) - see ...",
"handle" : "hdl:0.NA/0" ,
"handleValues" : [
...
]
}
)
I've put up a simple test client (based on the CrossTech blogged version)
here
http://nurture.nature.com/openhandle/
and the sources are available for inspection (html [2], js [3]). I'll copy
them later over to the project pages.
Note that the client here uses the jQuery [4] library and for convenience
loads it via the Google AJAX Libraries API [5].
Cheers,
Tony
[1] http://code.google.com/p/openhandle/wiki/OpenHandleParameters
[2] http://nurture.nature.com/openhandle/handle.html
[3] http://nurture.nature.com/openhandle/scripts/handle.js
[4] http://jquery.com/
[5] http://code.google.com/apis/ajaxlibs/
********************************************************************************
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and
attachments (if any). No contracts may be concluded on behalf of Macmillan
Publishers Limited or its agents by means of e-mail communication. Macmillan
Publishers Limited Registered in England and Wales with registered number 785998
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS
********************************************************************************
_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info