var $form1=$("<form action='"+url+"' id='f' name='f' target='newWindow1' method='post'></form>"); for(var i in params){ $form1.append($("<input type='hidden' name='"+i+"' value='"+params[i]+"'/>")); } $("body").append($form1); var newWindow=openwin("",'newWindow1',800,600); $form1.submit();