HtmlDialog.execute_script

See these post for some ideas …


So basically … from the Ruby-side …

my_ary = [[1,2,3],[4,5,6],[7,8,9]]
html_dlg.execute_script("Data = JSON.parse('#{my_ary.to_json}');")

… and afterward Data is a JS reference for a nested JS array.


The caveat is that all the objects in the nested array must be convertible to string via: #to_json.