home *** CD-ROM | disk | FTP | other *** search
/ .net 1999 January - Disc 2 / NET53B.iso / pc / netcall / js.txt < prev    next >
Encoding:
Text File  |  1998-11-06  |  1.2 KB  |  34 lines

  1. <script LANGUAGE="JavaScript">
  2. <!--
  3. function OpenNewWindow(arg_url,arg_top,arg_left,arg_width,arg_height,arg_navbtm)
  4. {
  5.     param = "titlebar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0,resizable=0";
  6. /* Check for valid values */
  7.     if (arg_width==0) arg_width = 630;
  8.     if (arg_height==0) arg_height = 455;
  9. /* Adjust values to screen size */
  10.     scrollbars = ",scrollbars=0";
  11.     param = param + scrollbars;
  12. /* Centralize Y/N */
  13.     if (arg_top <=0) arg_top = 0;
  14.     if (arg_left <=0) arg_left = 0;
  15. /* string em up */
  16.     arg_top = String(arg_top);
  17.     arg_left = String(arg_left);
  18.     arg_height = String(arg_height);
  19.     arg_width = String(arg_width);
  20.     param = param + ",top=" + arg_top;
  21.     param = param + ",left=" + arg_left;
  22.     param = param + ",height=" + arg_height;
  23.     param = param + ",width=" + arg_width;
  24.     /*window.alert(param); */
  25.     myWindow = window.open(arg_url,"NewWindow",param);
  26.     myWindow.location = arg_url;
  27.     if (arg_navbtm!="") window.location = arg_navbtm; 
  28. /* example link */    
  29. /* "javascript:OpenNewWindow('callus.html',-1,-1,640,480,'')" */
  30. /*<A href="javascript:OpenNewWindow('javatest.htm','50','50','200','200','about:blank')">PAUL</A>*/
  31. }    
  32. // -->
  33. </script>
  34.