diff options
| author | ivan <ivan> | 2008-03-31 21:52:39 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2008-03-31 21:52:39 +0000 | 
| commit | 315fa1d64fe15df1408569231730658538adc394 (patch) | |
| tree | 9f683b6100f0ee62c3b87ac3dd3a626188e7cc97 /httemplate | |
| parent | 2af2b9520702c827c0767dd7dd19bfe95ea6400e (diff) | |
update overlibmws to current code
Diffstat (limited to 'httemplate')
| -rw-r--r-- | httemplate/elements/iframecontentmws.js | 57 | 
1 files changed, 45 insertions, 12 deletions
| diff --git a/httemplate/elements/iframecontentmws.js b/httemplate/elements/iframecontentmws.js index c80998957..cbad738db 100644 --- a/httemplate/elements/iframecontentmws.js +++ b/httemplate/elements/iframecontentmws.js @@ -1,20 +1,53 @@  /*
 - iframecontentmws.js - Foteos Macrides
 -   Initial: October 10, 2004 - Last Revised: May 9, 2005
 - Simple script for using an HTML file as iframe content in overlibmws popups.
 - Include WRAP and TEXTPADDING,0 in the overlib call to ensure that the width
 - arg is respected (unless the CAPTION plus CLOSETEXT widths add up to more than
 - the width arg, in which case you should increase the width arg).  The name arg
 - should be a unique string for each popup with iframe content in the document.
 - The frameborder arg should be 1 (browser default if omitted) or 0.
 + iframecontentmws.js - Foteos Macrides (author and copyright holder)
 +   Initial: October 10, 2004 - Last Revised: January 26, 2008
 + Scripts for using HTML documents as iframe content in overlibmws popups.
 - See http://www.macridesweb.com/oltest/IFRAME.html for demonstration.
 + See http://www.macridesweb.com/oltest/IFRAME.html
 + and http://www.macridesweb.com/oltest/AJAX.html#ajaxex3
 + for more information.
  */
 -function OLiframeContent(src, width, height, name, frameborder) {
 +/*
 + Use as lead argument in overlib or overlb2 calls.  Include WRAP and
 + TEXTPADDING,0 in the call to ensure that the width arg is respected (unless
 + the CAPTION plus CLOSETEXT widths add up to more than the width arg, in which
 + case you should increase the width arg).  The name arg should be a unique
 + string for each popup with iframe content in the document.  The frameborder
 + arg should be 1 (browser default if omitted) or 0.  The scrolling arg should
 + be 'auto' (default if omitted), 'yes' or 'no'.
 +*/
 +function OLiframeContent(src, width, height, name, frameborder, scrolling) {
   return ('<iframe src="'+src+'" width="'+width+'" height="'+height+'"'
   +(name!=null?' name="'+name+'" id="'+name+'"':'')
   +(frameborder!=null?' frameborder="'+frameborder+'"':'')
 - +' scrolling="auto">'
 - +'<div>[iframe not supported]</div></iframe>');
 + +' scrolling="'+(scrolling!=null?scrolling:'auto')
 + +'"><div>[iframe not supported]</div></iframe>');
 +}
 +
 +/*
 + Swap the src if we are iframe content.  The name arg should be the same
 + string as in the OLiframeContent function for the popup.  The src arg is
 + a partial, relative, or complete URL for the document to be swapped in.
 +*/
 +function OLswapIframeSrc(name, src){
 + if(parent==self){
 +  alert(src+'\n\n is only for iframe content');
 +  return;
 + }
 + var o=parent.OLgetRef(name);
 + if(o)o.src=src;
 + else alert(src+'\n\n is not available');
 +}
 +
 +/*
 + Emulate the Back button if we are iframe content.  Use only in documents
 + which are swapped in by using the OLswapIframeSrc function.
 +*/
 +function OLiframeBack(){
 + if(parent==self){
 +  alert('This feature is only for iframe content');
 +  return;
 + }
 + history.back();
  }
 | 
