개발 등/JAVASCRIPT

window.open() 을 post 방식으로 전달할 때

darkhorizon 2012. 2. 2. 16:12
728x90
반응형
function onSubmit(){
 var myForm = document.popForm;

 var url = "/test/popForm.do";
 window.open("" ,"popForm",
       "toolbar=no, width=540, height=467, directories=no, status=no,    scrollorbars=no, resizable=no");

 myForm.action =url;
 myForm.method="post";
 myForm.target="popForm";
 myForm.testVal = 'test';
myForm.submit();
}


<form name="popForm">
    <input type="hidden" name="cmd" value="openPop" />
    <input type="hidden" name="testval" />
</form>
728x90