Welcome Guest, Not a member yet? Register   Sign In
Using JSON in data attributes with JS
#5

(11-14-2017, 10:48 PM)ivantcholakov Wrote: Another possible way that I used in the past is using base_64 encoded strings, they could be put as attributes directly. But this is a complication that I don't like, the JavaScript should decode from base_64 first and then to decode the JSON string.

I haven't used that technique, but I saw that it can be done, decoding in JS with atob(). For me I just want something that is easy and foolproof.
Reply


Messages In This Thread
RE: Using JSON in data attributes with JS - by skunkbad - 11-15-2017, 12:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB