[Javascript] Safari Bug in latest release

Roger Roelofs rer at datacompusa.com
Mon Nov 15 11:07:27 CST 2004


Terry,

On Nov 15, 2004, at 11:07 AM, Terry Riegel wrote:

> Hello,
>
> I have some javascript that just broke in Safari 1.2.4 (v125.11)
>
> var a = parent.toolbar.document.getElementById('delete');
>
> I added an alert to see if I could figure it out.
>
> alert( parent.toolbar.document );
>
> and it says "Undefined". Any ideas how I can fix this. It used to work 
> until I upgraded to the latest OS update whick included bug fixes for 
> Safari.

Without seeing your page, nothing specific.  Choose 'Log Javascript 
Excpetions' from the 'Debug' menu and open Console for a more specific 
error message.  My first test would be to change it to 
'window.parent.toolbar.document'  otherwise, all you can do is alert on 
each step to see where it fails i.e.

alert( parent );
alert( parent.toolbar );
alert( parent.toolbar.document );

If you are in a frameset you could try window.parent.frames['toolbar'];

hth
Roger
-------------------------------------------------------
Roger Roelofs                 web   www.datacompusa.com
Datacomp Appraisal Services   web   www.mhvillage.com
3215 Eaglecrest Drive, NE     Email rer at datacompusa.com
Grand Rapids, MI  49525-4593 
  




More information about the Javascript mailing list