본문 바로가기
Web Programing!/Script

form을 이용하여 post방식으로 새창열기

by 어설픈봉봉이 2013. 8. 27.
반응형
SMALL

 

 

 

 

 

form을 이용하여 post방식으로 새창열기

 


<head>
     <script>
          //frameName의 타겟명으로 새창띄우기 (타겟명,너비,높이)
          function openBlankFrame( frameName, width, height ) {
           var winprops = "";
           var left    = (screen.width - winWidth)/2;
           var top     = (screen.height- winHeight)/2;

     winprops    += "toolbar=no,menubar=no,scrollbars=yes,statusbar=no,resizable=yes";
     winprops    += ",top="+top+",left="+left+",width="+width+",height="+height;

 

    window.open( "", frameName, winprops );

   }
   

         function go() {
           var doc = document.getElementById("frm");

           openBlankFrame("reuseF","940","720"); 

     doc.action= "S070202050.do?form_reuse=1";
     doc.ServiceName.value = "S070202050-service";
     doc.submit();
  }
 </script>

</head>

 


 

<body>
      <form id="frmReuse" name="frm" method="post" style="margin:0 0 0 0;" target="reuseF">
          <input type="hidden" id="ServiceName" name="ServiceName" />
     </form>
</body>

 

 

 

 

반응형