/[webpac]/trunk2/out/js/iframe.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk2/out/js/iframe.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 579 by dpavlin, Mon Nov 1 22:15:20 2004 UTC revision 580 by dpavlin, Mon Nov 1 22:52:44 2004 UTC
# Line 65  function iframe_resize(name) { Line 65  function iframe_resize(name) {
65          if (! el || ! el.src) return;          if (! el || ! el.src) return;
66    
67          el.style.height = String(iframe_height(name)+'px');          el.style.height = String(iframe_height(name)+'px');
68    
69            // hide wait message
70            var w_el = iframe_id(name.replace(/^i/,"w"));
71            if (w_el) w_el.style.display = 'none';
72  }  }
73    
74  function iframe_load(name,url) {  function iframe_load(name,url) {
# Line 73  function iframe_load(name,url) { Line 77  function iframe_load(name,url) {
77    
78          var el=iframe_id(name);          var el=iframe_id(name);
79    
         if (! el) alert("can't find element "+name);  
   
80          // is there src, and is src same?          // is there src, and is src same?
81          if (el.src && el.src.substr(el.src.length - url.length) == url) return false;          if (el.src) {
82                    var old_src = el.src;
83                    // remove query
84                    var q = el.src.indexOf("?");
85                    if (q > 0) old_src = old_src.substr(0,q);
86                    // now compare just last parts
87                    old_src = old_src.substr(old_src.length - url.length);
88                    //alert(old_src+" == "+url+" q="+q);
89                    if (old_src == url) return false;
90            }
91    
92            // if iframe name if i_something, show waiting message called w_something
93            var w_el = iframe_id(name.replace(/^i/,"w"));
94            if (w_el) w_el.style.display = '';
95    
96            if (location.search) url += location.search;
97    
98          el.style.height = '0px';          el.style.height = '0px';
99          el.src = url;          el.src = url;

Legend:
Removed from v.579  
changed lines
  Added in v.580

  ViewVC Help
Powered by ViewVC 1.1.26