[thelist] Re: iframes & javascript errors

Fernando Gómez fgomez at criba.edu.ar
Thu Sep 12 13:54:01 CDT 2002


From: "Peter-Paul Koch" <gassinaumasis at hotmail.com>
Sent: Thursday, September 12, 2002 3:21 PM
Subject: Re: [thelist] Re: iframes & javascript errors

> Maybe it tries to do something outside the window, which is allowed at the
> original site but not in your setup. What's the URL of the page in the
> iframe? Then we can take a look.
>
> ppk


Well, to those of you who have prompted me to supply the problematic code,
here it is, in its purest form:

<html>
<style>
  #LCAuthDiv {display: none;}
 iframe {width: 90%; height: 350px; border: 1px solid #666;}
</style>
<script>
function init() {

document.getElementById("LCAuthDiv").getElementsByTagName("iframe")[0].src =
"http://authorities.loc.gov/cgi-bin/Pwebrecon.cgi?DB=local&PAGE=First";

document.getElementById("MRLookupDiv").getElementsByTagName("iframe")[0].src
= "http://www.ams.org/mrlookup/";
}
</script>
<body onLoad=init()>
  <div id="LCAuthDiv" align="center"><IFRAME frameborder="0"
src=""></IFRAME></div>
  <div id="MRLookupDiv" align="center"><IFRAME frameborder="0"
src=""></IFRAME></div>
</body>
</html>

The page loaded on #LCAuthDiv is the one that generates the error.

I show here only two iframes, but there could be many of them. I would like
all of this pages to be loaded when the cataloger starts her session, so
they are readily available whenever she needs them.

Of course, if I really need to have each iframe visible to avoid the error,
then I would have to wait till the first time each page is asked for, and
only then do the loading... But once the problem appears, one wants to know
how to *really* solve it! And I think it's not such a bad idea to be able to
make those "foreign" error messages simply dissapear :)

Thanks again.

Fernando Gómez







More information about the thelist mailing list