I didn't mean window.onload literally; use a browser-compatible version of it [jQuery, btw, would figure that out automatically for you, so if you can integrate jQuery in your page, you may want to try Matt's plugin.]
My prototype uses a function called "addEvent" from Dustin Diaz, see http://www.dustindiaz.com/rock-solid-addevent I think it uses 'attachEvent' in IE6, which appears to work. I'm also using it in Majax (libx.org/majax) and it works there as well in IE6. - Godmar On Thu, Mar 20, 2008 at 11:22 AM, David Kane <[EMAIL PROTECTED]> wrote: > Hi Godmar, > > Thanks. Yes. I tried that, but the support for window.onload does not exist > in IE6. I also tried the defer="defer" attribute in the script tag, which > did not work either. Tim's solution looks good. I have yet to try it > though. ( will wait until after Easter). > > Cheers, > > David > > > > On 20/03/2008, Godmar Back <[EMAIL PROTECTED]> wrote: > > > > Have you tried placing your code in an window.onload handler? Read > > the example I created at libx.org/gbs and if that works for you in > > IE6, use the technique there. (Or you may just use the entire script - > > it seems you're reimplementing a lot of it anyway.) > > > > > > - Godmar > > > > > > On Thu, Mar 20, 2008 at 9:09 AM, KREYCHE, MICHAEL <[EMAIL PROTECTED]> > > wrote: > > > Tim and David, > > > > > > Thanks for sharing you solutions; the IE problem has been driving me > > > crazy. I've mostly been working on the title browse page of our > > catalog. > > > > > > > > > Originally I had it working on Firefox, Safari, and IE7 (IE6 worked if > > I > > > refreshed the page); after some rearrangement of the script, it's now > > > working on IE6 but broken on Safari. > > > > > > This is still proof of concept code and is only on our staging server > > > (http://kentlink.kent.edu:2082/). Try a keyword search and you should > > > see some Google links. > > > > > > Mike > > > -- > > > Michael Kreyche > > > Systems Librarian / Associate Professor > > > Libraries and Media Services > > > Kent State University > > > 330-672-1918 > > > > > > > > > > > > > -----Original Message----- > > > > From: Code for Libraries [mailto:[EMAIL PROTECTED] On > > > > Behalf Of Tim Hodson > > > > Sent: Thursday, March 20, 2008 7:21 AM > > > > To: CODE4LIB@LISTSERV.ND.EDU > > > > Subject: Re: [CODE4LIB] Google Book Search API - JavaScript Query > > > > > > > > One way I have used to resolve this is to poll the object > > > > until it exisits before continuing. > > > > > > > > function myInit(id){ > > > > 13 // if Obj is not defined yet, call this function again until it > > is. > > > > 14 > > > > 15 if (typeof myObj == "undefined"){ > > > > 16 createScript(); > > > > 17 setTimeout("myInit()", 60); > > > > 18 return; > > > > 19 } > > > > 20 // do stuff onlu if myObj is now an object > > > > 21 else if (typeof myObj == "object"){ > > > > 22 > > > > 23 myGo(); > > > > 24 return; > > > > 25 } > > > > > > > > HTH Tim > > > > 26} > > > > > > > > On 20/03/2008, David Kane <[EMAIL PROTECTED]> wrote: > > > > > HI Folks, > > > > > > > > > > We were one of the first libraries to get the GBS API > > > > working on our OPAC. > > > > > Like many OPACs, ours is difficult to modify at times and > > > > requires a > > > > > dynamic insert of a generated (by PHP) JavaScript, which > > > > is hosted on > > > > > a separate server to the OPAC pages. > > > > > > > > > > It seems to work fine on most browsers, giving an > > > > appropriate link to > > > > > a full/partial text preview of that work on GBS. I run into a > > > > > problem with IE6, which means that the function defined in the > > > > > JavaScript aren't available by the time the script is > > > > called at the bottom of the page. > > > > > > > > > > You should be able to see a GBS link on most pages, here > > > > is an example: > > > > > > > > > > http://witcat.wit.ie/search/i?SEARCH=0192833987 > > > > > > > > > > The attached image shows you what you should see. > > > > > > > > > > If anyone can shed any light on this, it would be appreciated. > > > > > > > > > > Thanks and best regards, > > > > > > > > > > > > > > > David Kane > > > > > Systems Librarian > > > > > Waterford Institute of Technology > > > > > Ireland > > > > > > > > > > > > > > > > > > > > > > -- > > > > Tim Hodson > > > > www.informationtakesover.co.uk > > > > www.timhodson.co.uk > > > > > > > > > >