pkimber.net
0.0.2
  • Amazon
  • Android
  • Apple
  • Apache
  • C++
  • C#
  • CSS
  • deploy
  • Django
  • Eclipse
  • git
  • Google
  • HTML
  • HTTP
  • Java
  • Javascript
    • Apps
    • AngularJS
    • Ember.js
    • Ext
    • Fckeditor
    • jQuery
    • Knockout
    • Modules
    • Node
    • Phantomjs
    • PhoneGap
    • Prototype
    • Testing
    • Tinymce
    • Underscore
    • Links
    • Array
    • Boolean
    • Class
    • Closure
    • Code Snippets
    • Collections
    • Data Type Conversions
    • Data Type
    • Date
    • Debug
    • Documentation
    • Document Object Model (DOM)
    • Exceptions
    • Functions
    • Issues
    • narwhal
    • null
    • Objects
    • Popup Windows
      • Links
      • Sample Code
        • Pop-up text
        • Pop-up page
      • Generator
    • prototype
    • Private Members
    • Random
    • Regular Expressions
    • Rhino
    • Standards
    • String
    • Timer
    • Tips
    • Tutorial, Built in Objects
    • Tutorial Objects
    • Tutorial
    • Variables
    • Widget
  • jython
  • Linux
  • Liquibase
  • Lucene
  • Markup
  • Memcached
  • Mercurial
  • Microsoft
  • Mozilla
  • MySQL
  • Nginx
  • OpenOffice
  • PHP
  • PostgreSQL
  • Project
  • Python
  • R programming language
  • RabbitMQ
  • Raspberry Pi
  • Redis
  • Redmine
  • Ruby
  • Social
  • Solr
  • SQLite
  • subversion
  • TaskWarrior
  • Testing
  • Vim
  • Virtualbox
  • CV - Patrick Kimber
  • Info
  • CV - Open Source Contributions
pkimber.net
  • Javascript
  • Popup Windows
  • View page source

Popup Windows

Links

  • http://www.htmlcodetutorial.com/linking/linking_famsupp_70.html

  • http://www.yourhtmlsource.com/javascript/popupwindows.html

  • http://www.sitepoint.com/article/perfect-pop-up

  • http://scriptasylum.com/tutorials/openwindows.html

Sample Code

Pop-up text

A simple pop-up windows suitable for use when debugging code and you need to write some text for viewing.

function popupMyWindow(text) {
    var myWindow = window.open('', 'name', 'height=400,width=700,scrollbars=yes');
    myWindow.document.write('<html><head><title>DOM</title>');
    myWindow.document.write('</head><body>');
    myWindow.document.write('<p>' + text + '</p>');
    myWindow.document.write('<p><a href="javascript:self.close()">Close</a></p>');
    myWindow.document.write('</body></html>');
    myWindow.document.close();
    myWindow.focus();
}

Pop-up page

…to have a link which pops up a small window displaying a given url:

<a href="javascript:window.open('http://www.westberks.gov.uk', 'windowName', 'width=300,height=150,status=no,location=no');" target="_blank"  title="Sample Link Description">FRED</a>

(from Dave S 18/05/2007 17:05)

Generator

http://accessify.com/tools-and-wizards/accessibility-tools/pop-up-window-generator/

Previous Next

© Copyright 2023, Patrick Kimber.

Built with Sphinx using a theme provided by Read the Docs.