    

       

    

    

---*---*---*---*---*---*---*---

  :=-

  alert()     window

   

window.alert()

  window.confirm        window

            

        ok    true  cancel  

 false  



var ask = comfirm("Do you wish to proceed?");

var msg;

if(ask)msg="OK button was pushed";

else msg = "Cancel button was pushed";

document.write(msg);



***
    ask    (true==ask)
***


  :=-

  window.prompt()       

         OK  Cancel

          

            

    



var user = prompt("Please enter your name...","");

if(user==null||user=="")user="visitor";

document.write("Hi"+user+",welcom to this page");


***
      

       

 visitor             

       
***



    :=-

  window.location          

        window.location.herf   

   window.location       

    

protocol://host/pathname?#hash

     location.hash     

var locn = "Href:"+location.href;

var port = "Protocol:"+location.protocol;

var host = "Host:"+location.host;

var path = "Path:"+location.pathname;

var hash = "Hash:"+location.hash

alert(locn+"\n"+port+"\n"+host+"\n"+path+"\n"+hash);



   :=-

  window.history          

     

  back()  forward()   window.history    

Backward  Forward  

          

window.history.go()             

            

       

(-1)if(required_input=="")history.go;



 :=- 

  window.onload           

     

  init()            

 

  onload  html      body   onload

    window.onunload  onload      

     

  window.onunload      

     

             

function goodbye(){

alert("Thanks for calling - Come back soon");

}

window.onunload = goodbye;




   :=-

   window.status       

            

          

     window.defaultStatus



          html  

  onmouseover         

 

<BODY ONLOAD = "window.defaultStatus = 'Status Demo'">

<A HREF ="nextpage.htm"

ONMOUSEOVERN ="window.status='Click Here';return true">

Hypertext Link</A>

****
     html

     

<html>

<BODY ONLOAD = "window.defaultStatus = 'Status Demo'">

<A HREF ="nextpage.htm"

ONMOUSEOVERN ="window.status='Click Here';return true">

Hypertext Link</A>

</html>
***


  :=-

         

       window.open()    

            

  

             

function popup(){

window.open("popup.html","",

"top=40,left=40,width=200,height=100");

}

window.onload=popup;


****
               
***


   :=-

 Directories     

 Height          

 Left   x    

 Location    

 Menubar     

 Resizable      

 Scrollbars        

 Status    

 Toolbar         back  forward

 Top   y    

 Width          

            

        yes  no      

  yes           

 

function popup(){

window.open("popup.html","",

"top=40,left=40,width=200,height=100,status");

}


   :=-

       windoe.close() 

        window.open()     window

  window   windoe.close()       

 

               

var popwindow;

function popup(){

popwindow = window.open("popup.html","",

"top=40,left=40,width=200,height=100,directories,

location,menubar,resizable,scrollbars,toolbar");

}

function close_popup() {

if(popwindow != null)popwindow.close();

}

window.onload = popup;

window.onunload = close_popup;



  :=-

            

window.screen



              

   

if(document.all){  //Internet Explorer

var win_w = window.document.body.clientWidth;

var win_h = window.document.body.clientHeight;

}

if(document.layers){ //Netscape

win_w = window.innerWidth;

win_h = window.innerHeight;

}

if(document.all || document.layers){

var scr_w = window.screen.width;

var scr_h = window.screen.height;

var res = "Resolution:"+scr_w+"x"+scr_h;

var iwin = "Innerwindow:"+win_w+"x"+win_h;

alert(res+"\n"+iwin);

}


***
        window.print()
***


  :=-

  window.frames           

   frameset   html

              

parent.window.frames[]

          

        name    frame 

  html       main        

   parent.window.frames.main



var framenums = "No.frames:"

+parent.window.frames.length;

var framenames = "\nFrame1:"

+parent.window.frames[0].name;

var framenames+= "\nFrame2:"

+parent.window.frames[1].name;

var framenames+= "\nFrame3:"

+parent.window.frames[2].name;

alert(framenums+framenames);



      :=-



function next(){

parent.frames.btm.window.location = "nextpage.htm";

}

function write_header(){

var msg = "Frame2<br>Written by Frame1";

parent.frames.hdr.window.document.write(msg);

}

window.onload = write_header;




  :=-

        window.onerror    

     

           

           

      browser error

      true         

            error-handler 

       

window.onerror = errorhandler;

function errorhandler(msg,url,ln){

alert("Error:"+msg+"\nIn File:"+url+"\nAt Line:"+ln);  return
true;

}

//This is a deliberate mistake

document.form[theMistake].value="myButton";


-----------------*------------------------*-----------------*-----------------

   

       

     

            

      

  

  

hma2003h911@yahoo.com


