# this works:

def test_link(name, options = {}, html_options = nil)
url = url_for(options[:url])
"<form id='k' method='post' action=\"#{url}\">" +
"<input id='value' type='hidden' name='value' value="'Foooo'"></form>"+
"<input class='btn_save' onclick=\"$('k').submit();\" type='button'/>"
end

# but i want something like this:

def test_link(name, options = {}, html_options = nil)
onclick = "var f = document.createElement('form');"+
"f.style.display = 'none'; this.parentNode.appendChild(f);"+
"f.method = 'POST'; f.action = '/typ/foo'; f.id='k';"+
"var i = createElement('input'); i.type='hidden'; i.value='Foooo'; i.name='value';"+
"document.write(<input id='value' type='hidden' name='name' value='Fooo'/>);"+
"f.submit(); return false;"
"<input class='btn_save' onclick=\"#{onclick}\" type='button'/>"
end

# but this doesn' work...