jQuery Widget Factory
Links about jQuery widget factory: http://wiki.jqueryui.com/w/page/12138135/Widget%20factory http://blog.nemikor.com/tag/widget-factory/ http://docs.jquery.com/Plugins/Authoring
Links about jQuery widget factory: http://wiki.jqueryui.com/w/page/12138135/Widget%20factory http://blog.nemikor.com/tag/widget-factory/ http://docs.jquery.com/Plugins/Authoring
[code lang=”js”] function post_to_url(path,params,method){ method=method||"post"; var form=document.createElement("form"); form.setAttribute("method",method); form.setAttribute("action",path); for(var key in params){ var hiddenField=document.createElement("input"); hiddenField.setAttribute("type","hidden"); hiddenField.setAttribute("name",key); hiddenField.setAttribute("value",params[key]); form.appendChild(hiddenField); } document.body.appendChild(form); form.submit(); } [/code] Consume it: <a title=”Title” href=”javascript:post_to_url(‘http://www.domain.com’,{‘rsit’:’3528′,’sit’:’2726′})”>Link</a>