DHTML Popup/Timer Demo

Updates

This is an old demo - I wrote it in 2002. Please keep that in mind ;-)

Application

xPopup is a simple alternative to pop-up windows. It uses dynamically created iFrames. Here's how to use it.

 

<style type='text/css'>
.popupStyle {
  width:150px; height:150px;
  border:1px solid #330;
  border-top:4px solid #330;
  margin:0; padding:0;
}
</style>
<script type='text/javascript' src='../x.js'></script>
<script type='text/javascript' src='../lib/xslideto.js'></script>
<script type='text/javascript' src='../lib/xpopup.js'></script>
<script type='text/javascript' src='../lib/xtimer.js'></script>
<script type='text/javascript' src='../lib/xcardinalposition.js'></script>
<script type='text/javascript'>

var pop1, pop2;

window.onload = function()
{
  // 'Position' is one of the following:
  // 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'cen', 'cenh' or 'cenv'

  pop1 = new xPopup(
             'timeout',       // timer type
             10000,           // timeout in ms
             'w',             // from, on show
             'cen',           // to, on show
             'n',             // to, on hide
             'popupStyle',    // style class name
             'popup1',        // id
             'popup1.html');  // popup url

  pop2 = new xPopup(
             'interval',    
             5000,          
             'nw', 
             'se',
             'w',
             'popupStyle',  
             'popup2',      
             'popup2.html');
}
</script>

xPopup Implementation

The implementation of xPopup demonstrates the use of the xTimer object.

View xPopup and xTimer.

License

By your use of X and/or CBE and/or any Javascript from this site you consent to the GNU LGPL - please read it. If you have any questions about the license, read the FAQ and/or come to the forums.

Tech Support

Forum support is available at the X Library Support Forums.

Search

Cross-Browser.com

World Wide Web