Awesome! new possibilities! Thanks On Wed, Aug 28, 2019 at 5:58 AM hh via use-livecode < use-livecode@lists.runrev.com> wrote:
> > Geoff C. wrote: > > If I set the url for the browser widget to a url, and the > > server sets a cookie, can I read/modify/delete that cookie? > > Cookie structure (itemdel is ";"). > item 1: A "name = value" pair containing the actual data, > item 2: An expiry date after which it is no longer valid, > item 3: The domain and path of the server. > > Now > > 1. set the javascriptHandlers of widget "browser" to "JS" > 2. In the widget's script (or above it) write > > on JS x > replace ";" with ";" & cr in x -- it make more readable > put x into fld "Cookies" > end JS > > Then, on mouseUp: > > -- read (you get only 'name=value' pairs, not expires nor path) > do "liveCode.JS(document.cookie)" in widget "browser" > > -- create/modify (path is usually the current page) > do "document.cookie = 'username=Geoff Canyon;" & \ > "expires=Mon, 23 Dec 2019 22:30:00 UTC;" & \ > "path=/;' " in widget "browser" > > -- delete (set it with an expiry date before today) > do "document.cookie = 'username=Geoff Canyon;" & \ > "expires=Sat, 23 Dec 2000 22:30:00 UTC;" & \ > "path=/;' " in widget "browser" > > > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode