Code.GeekInterview.com
 
Code Samples Java Script
 

JavaScript Pop-up Window


Code ResourceAuthor: srinivasaraobora  

Difficulty Level: Beginner

Published: 3rd Jun 2009   Read: 4327 times  

Filed in: Java Script
Add Comment


 

 

Sponsored Links


 

 

This script is for popup window

 


Sample Code
  1. <html>
  2. <head>
  3. <title>
  4. This is main page
  5. </title>
  6. <SCRIPT TYPE="text/javascript">
  7. <!--
  8. function popup(mylink, windowname)
  9. {
  10. if (! window.focus)return true;
  11. var href;
  12. if (typeof(mylink) == "string")
  13.    href=mylink;
  14. else
  15.    href=mylink.href;
  16. window.open(href, windowname, "width=400,height=200,scrollbars=yes");
  17. return false;
  18. }
  19. //-->
  20. </SCRIPT>
  21.  
  22.  
  23. </head>
  24.  
  25.  
  26. <body>
  27. <A
  28.    HREF="http://www.google.com"
  29.    onClick="return popup(this, 'notes')">my popup</A>
  30.  
  31. </body>
  32. </html>
  33.  
Copyright GeekInterview.com


Next Article: Dynamic Date and Time


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    



Comments

I need script for uploaded photo preview...
Comment posted by: kalpana on 2010-07-04T17:28:12

Popular Coders

# Coder NameHits
1. srinivasaraobora17896
2. Durga Prasad12338
3. chowsys6220
4. iamdvr4269
5. Kalidasan3344

Active Coders

# Coder NameCodes
1. srinivasaraobora3
2. chowsys2
3. Durga Prasad1
4. iamdvr1
5. Kalidasan1

Refined Tags