Rifky Apriadi

July 17, 2008

pupopwindow

Filed under: PHP

bagaimana cara membuka form dengan window baru? nih sourcenya, pake javascript. duh udah sore nih…mudah-mudahan ini bisa bermanfaat ya

<script language="javascript">
function PopupWindow(strURL,intHeight,intWidth)
{
var newWindow;
var intTop= (screen.height - intHeight) / 2;
var intLeft= (screen.width - intWidth) / 2;
var props = ’scrollBars = yes, resizable = yes, toolbar = no, menubar = no, location = no, directories = no,width=’+intWidth+’,height=’+intHeight+’,left=’+intLeft+’,top=’+intTop+'’;
self.name = "<%=strRandom%>"
newWindow = window.open(strURL, "Popup", props);
}
</script>
<script language="javascript">
function PopupWindowRpt(strURL,intHeight,intWidth)
{
var newWindow;
var intTop= (screen.height - intHeight) / 2;
var intLeft= (screen.width - intWidth) / 2;
var props = ’scrollBars = yes, resizable = yes, toolbar = no, menubar = yes, location = no, directories = no, width=’+intWidth+’,height=’+intHeight+’,left=’+intLeft+’,top=’+intTop+'’;
self.name = "<%=strRandom%>"
newWindow = window.open(strURL, "Popup", props);
}
</script>

trus cara manggilnya? nih :

 <tr valign="center">
            <td width="50%" align="left" style="border-top: 0px solid #000000"><font face="Arial Narrow" size="3" color="#000000">
              <input type="button" name="tombol" value="buka" onClick="PopupWindow(’uploadoc.php?A=I’,131,494);">
            </font>
            </td>

dah ah, waktunya sholat ashar an pulang lagi…. emoticon

Comments »

The URI to TrackBack this entry is: http://rifkyiip.blogsome.com/2008/07/17/pupopwindow/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Ian Main