Jump to content

Rainel

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Rainel

  1. yeahh dat's it i want my pop up window will b close 1 by 1 by the close button...thnks for the reply..
  2. yeahh dat's it i want my pop up window will b close 1 by 1 by the close button...but anyway guys thanks for the rply this is my first time when i got into forum...
  3. Hey guys..could you help me about this code..when i close the close button after opening a window it says that win[].closed is null or not an object.could you please explain me about this one..thnksmy full code is:<html> <head> <script language='javascript'> var win = new Array(); var num=0; var ctr=0; //t=0; //l=0; but=0; function dynPages(){ var n = new Array('00','37','7F','B7','FF'); with(parent.body_link){ document.write('<html><head></head>'); document.write('<body><center>'); document.write("<h1>Rainel's Page</h1>"); document.write("<img src='images/homelogo.jpg'border='0'>"); document.write("<table border='1'cellpadding='0'cellspacing='0'>"); for(i=0;i<5;i++){ document.write('<tr>'); for(y=0;y<5;y++){ for(x=0;x<5;x++){ document.write("<td bgcolor='#" + n + n[y] + n[x]+"'><font size=1>"); document.write(n+ n[y]+ n[x]); document.write('</font></td>'); } } document.write('</tr>'); } document.write('</center></table></body></html>'); } } function open_win(){ win[num]=open("","myWin" + num,"menubar=1,resizable=1,width=350,height=250,top=10,left=10"); //win[num].focus(); with(win[num]){ document.write('<html><head></head>'); document.write('<body><center>'); document.write('<hr size=2>'); document.write("<h4>"); document.write('win' + ctr); document.write("</h4>"); document.write('<h1>Welcome to</br>'); document.write('my</br>'); document.write('popup</h1>'); document.write('<hr size=2>'); document.write("<input type='button' onclick='java script:window.close()'value='CLOSE'>"); document.write('</center></body></html>'); } num++; ctr++; frontAll(); } function close_win(){ if(win[ctr].closed!=0){ win[ctr].close(); ctr--; } } function frontAll(){ for(i=0;i<win.length;i++){ win.focus(); } } </script> </head> <body> <table border='0'> <tr><td><input type='button'value='Dynamic Pages'name='but1'onclick='dynPages()'></td></tr> <tr><td><input type='button'value='Open New Window'name='but2'onclick='open_win()'></td></tr> <tr><td><input type='button'value='Close Window'name='but3'onclick='close_win()'></td></tr> </table> </body></html>
×
×
  • Create New...