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) { |
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; |