0

I'm using datatables as show here http://railscasts.com/episodes/340-datatables The default field for sorting is id and that is fine.

However, I also need to be able to redirect to this page from another page so that table must be sorted by another field. I find out what GET query is sent to a server, by it's very long, therefore, there must be another standard way.

So, how do I redirect to a page where this table located to that it causes it sort itself using a particular field?

1 Answer 1

1

You can find a solution on this post:

How can I get query string values in JavaScript?

Basically, it's exactly what you're trying to achieve, which is finding out what's coming on the query string.

Sign up to request clarification or add additional context in comments.

1 Comment

are you implying I have to use that super-long string? I know I can use and achieve my goal, but is there any simpler way?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.