598Re: [json] Re: problem to sending variable.
- Nov 30, 2006Hi,
What you'd ideally do is, eval() or parse the json string into a
Then serialize it back to a string, and use XHR.
The problem is usually that it isn't safe to send requests to another
domain, because of cross site scripting issues.
Because of this, most browsers don't allow you to do this by default. So
it doesn't matter if you got the data by dyamic <script>
generation or XHR, but sending it back will definitely be a problem.
What i'd suggest is, keep a proxy page on your own server which forwards
these requests to the other domain.
prashant shah wrote:
> but there i didn't find my solution. Actually i want to do some
> How can i set this variable to JSON value and send JSON data to other
> domain ?
> one more thing right now how many browsers support JSONRequest ?
> Douglas Crockford <douglas@...
> <mailto:douglas%40crockford.com>> wrote:
> In the short term, you can use a technique such as this:
> Be very careful though because it is terribly insecure. It should only
> be used if you fully trust the server.
> We need a less dangerous alternative. I suggest that we should have a
> new transport mechanism like JSONRequest
> http://json.org/JSONRequest.html. <http://json.org/JSONRequest.html.>
> If you agree, write to your favorite
> browser maker, and tell them you want JSONRequest.
> Access over 1 million songs - Yahoo! Music Unlimited.
> [Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>