But this is not acceptable. URL should not look like this. And I can't send the parameters through
POST because my team lead denied it.
I wonder can I send an ajax request before my main
GET request and pass array of
ids with it, store it someway in my "new" method and use them when
GET request is being sent? If it is possible how can I do this in rails? I other words I need to send my array with ajax request, store it somehow and use it when my actual
GET request is sent. Thanks for replies.
preguntado el 04 de julio de 12 a las 08:07
You can serialize the data using JSON.
Entonces, si tienes:
var ids = [9,4,5,8];
Puedes usar esto:
var getString = "?ids="+JSON.stringify(ids); var filePath = "whereYouAreSending"; window.open(filePath+getString);