Hi Tim, You would need code that runs on client-side. Insert JavaScript logic in the head of the page that does an AJAX call to ML, or have JavaScript logic add this information to any submit url or form you have on your page..
Kind regards, Geert > -----Oorspronkelijk bericht----- > Van: [email protected] [mailto:general- > [email protected]] Namens Tim Finney > Verzonden: vrijdag 18 mei 2012 22:03 > Aan: [email protected] > Onderwerp: [MarkLogic Dev General] How to test for JavaScript objects > > Hi All, > > What is the recommended way to test whether a client's browser has a > particular JavaScript object (e.g. localStorage, JSON) and to get the > answer into an XQuery? > > Here's what I'd like to be able to do: > > let $has-local := my:client-JS-has("localStorage") > return > if ($has-local) then ( > ... > ) > else <p>Sorry. Your browser would need local storage to do that.</p> > > Best, > > Tim Finney > > > _______________________________________________ > General mailing list > [email protected] > http://community.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://community.marklogic.com/mailman/listinfo/general
