I have the following javascript in the view: 

            var id = $('#CurrentCartId').text();
            var description = $(this).text();
            var url='{{=URL('cart','description')}}';
            url += '/' + id + '/';
            url += description;
            ajax(url,[],':eval');

the reason I use url+= to pass parameters instead of using args in the URL 
helper is because the parameters are coming from the html itself - they are 
not known in the controller py. 

now the problem is that it changes the description and I have no way to 
recover its original value. for example, when description is "askjdf d  
 dka;lskdj  3838&^&%$#@ ((alksjdf__ - ))" (just a randomly typed string in 
this case), it comes out as "askjdf_d___dka_lskdj__3838_____". Obviously, 
it needs to do this conversion in order to pass  the parameter, but I need 
to be able to recreate the original string, entered by the user. 

Is there a better way of doing this? I.e. a better way of passing a 
parameter in  a way that it could be "recreated" and stored in the database 
exactly as typed by the user? 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e763b31d-a8ef-494c-8b25-d4872cdcb130%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to