Encode string in Ruby decode it in Javascript?


L

Linus Oleander

As the title describe.
I need to pass some data from the server side to the browser.
But I cant figure out how to encode it on the server en decode using
Javascript.

Any ideas?
 
Ad

Advertisements

M

Michael Fellinger

[Note: parts of this message were removed to make it a legal post.]

JSON


As the title describe.
I need to pass some data from the server side to the browser.
But I cant figure out how to encode it on the server en decode using
Javascript.

Any ideas?
 
Ad

Advertisements

L

Linus Oleander

Michael said:
JSON

On Jul 16, 2010 8:42 AM, "Linus Oleander" <[email protected]>
wrote:

As the title describe.
I need to pass some data from the server side to the browser.
But I cant figure out how to encode it on the server en decode using
Javascript.

Any ideas?

I'm already using JSON to pass data to the client.
But as I wrote in my first post i need to decode a string on the server
site and decode it in the client.

I found a solution to the problem.

The unescape(); method on the client (JS)
And on the server I used URI::escape (Ruby)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top