Advertisement
Guest User

Untitled

a guest
Jun 13th, 2013
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. CODE FOR FILE a.htm
  2. ---------------------------------------------------------------------------------------------
  3.  
  4. <html>
  5. <head>
  6. <script type="text/javascript" src="window_manager.js"></script>
  7. <script type="text/javascript">
  8. function init(){
  9. // give this window a unique name
  10. window.name='A';
  11.  
  12. // just outright opening them now for demo purposes. How/when you open them is up to you
  13. // open window B
  14. openWindow('b.htm', 'B', '');
  15. // open window C
  16. openWindow('c.htm', 'C', '');
  17. }
  18. </script>
  19. </head>
  20. <body onload="init();">
  21. This is window A
  22. </body>
  23. </html>
  24.  
  25. ---------------------------------------------------------------------------------------------
  26. CODE FOR FILE b.htm
  27. ---------------------------------------------------------------------------------------------
  28. <html>
  29. <head>
  30. <script type="text/javascript" src="window_manager.js"></script>
  31. <script type="text/javascript">
  32. function init(){
  33. // give this window a unique name
  34. window.name='B';
  35. // just outright opening them now for demo purposes. How/when you open them is up to you
  36. // open window D
  37. openWindow('d.htm', 'D', '');
  38. }
  39. </script>
  40. </head>
  41. <body onload="init();">
  42. This is window B
  43. </body>
  44. </html>
  45.  
  46. ---------------------------------------------------------------------------------------------
  47. CODE FOR FILE c.htm
  48. ---------------------------------------------------------------------------------------------
  49. <html>
  50. <head>
  51. <script type="text/javascript" src="window_manager.js"></script>
  52. <script type="text/javascript">
  53. function init(){
  54. // give this window a unique name
  55. window.name='C';
  56. }
  57. </script>
  58. </head>
  59. <body onload="init();">
  60. This is window C
  61. </body>
  62. </html>
  63.  
  64. ---------------------------------------------------------------------------------------------
  65. CODE FOR FILE d.htm
  66. ---------------------------------------------------------------------------------------------
  67. <html>
  68. <head>
  69. <script type="text/javascript" src="window_manager.js"></script>
  70. <script type="text/javascript">
  71. function init(){
  72. // give this window a unique name
  73. window.name='D';
  74. // is window C open?
  75. alert('Is Window C open? '+ is_window_open('C', true) );
  76. }
  77. </script>
  78. </head>
  79. <body onload="init();">
  80. This is window D
  81. </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement