Javascript


Related applications


Search a word:
   



© The scientific sentence. 2010


Javascript: about windows



1. Open a second window


Just follow this example:

<HTML>
<HEAD>
<TITLE>second window</TITLE>
</head>
<BODY>

<FORM><table><tr>
<td>
<INPUT TYPE="button" VALUE="Open a second window"
onClick="msgWindow=window.open('games/game1.html','window2',
'resizable=yes,width=600,height=500')"; id = "wind1"; 
onmouseover= "this.style.background = '#FFE4E1'";
onmouseout= "this.style.background = '#AFEEEE'";>   
</td>
<td>
<INPUT TYPE="button" VALUE="Close this second window"
onClick="msgWindow.close()"; id = "wind2"; 
onmouseover= "this.style.background = '#FFEFD5'";
onmouseout= "this.style.background = '#E6E6FA'";>   
</td></tr></table>
</FORM>

</BODY>
</HTML>

2. Sorts of Windows


Example:

1. alarm and acsess to the page:
<a href="noscript.html" onClick="window.alert('something .. ')"
>Alert and error</a>

2. just alarm:
<a href="noscript.html" onClick="window.alert('something .. '); 
return false;">Alert</a></li>

3. with confirm:
<a href="http://scientificsentence.net" onClick="return 
window.confirm('Confirm redirection to scientificsentence.net ?');"
>scientificsentence.net</a> 

3. prompt:
<a href="noscript.html" onClick="status = window.prompt('Your 
ID: ', ''); return
false;">Prompt</a></li>

4. open a page:
<a href="noscript.html" onClick="window.open 
('http://scientificsentence.net', 'SS'); return
false;">scientificsentence.net</a>

5. without status and without location:
<a href="noscript.html" onClick="window.open
('http://scientificsentence.net', 'SS', 'status=no,location=no'); 
return false;">scientificsentence.net</a> 

6. with location:
<a href="http://scientificsentence.net"
  onClick="window.location='http://scientificsentence.net'; 
  return false">
scientificsentence.net</a>

7. with location.replace:
<a href="scientificsentence.net"
onMouseOver="window.status='go to scientificsentence.net'; 
return true"
onClick="window.location.replace('http://scientificsentence.net'); 
return false">
scientificsentence.net </a>


1. alarm and acsess to the page: Alert and error

2. just alarm: Alert

3. with confirm: scientificsentence.net 

3. prompt: Prompt

4. open a page: scientificsentence.net

5. without status and without location: scientificsentence.net 

6. with location: scientificsentence.net

7. with location.replace:  scientificsentence.net 


  
Google
Web
ScientificSentence
 




chimie labs
|
scientific sentence
|
java
|
php
|
green cat
|
contact
|


© Scientificsentence 2009. All rights reserved.