On Apr 4, 4:20 pm, Lawrence D'Oliveiro <l...@geek-
central.gen.new_zealand> wrote:
> In article
> <3548e1a2-793f-418a-88ef-b2cf5c838...@s19g2000prg.googlegroups.com>, JohnO
> did write:
>
>
>
> > On Apr 4, 12:49 pm, Lawrence D'Oliveiro <l...@geek-
> > central.gen.new_zealand> wrote:
> >> In article
> >> <8ab0c28f-08f1-410e-95ee-32a2b2425...@i12g2000prf.googlegroups.com>,
> >> JohnO did write:
>
> >> > On Apr 4, 11:38 am, Lawrence D'Oliveiro <l...@geek-
> >> > central.gen.new_zealand> wrote:
>
> >> >> In article
> >> >> <61ab2ff4-6946-464c-9433-1b36814ba...@i12g2000prf.googlegroups.com>,
> >> >> JohnO did write:
>
> >> >> > if (browser=="Netscape")
>
> >> >> Yuk. Please, check directly for the functionality you need, not for
> >> >> some purely informational name.
>
> >> > Go on then, explain exactly how to do that, please.
>
> >> Check for the existence of those objects before trying to use them.
>
> > But it is not so much exisetnce of objects that I am interested in.
> > All the platforms support the alert() method, but not all of them make
> > a sound, and it doesn't seem to be documented which do. I have
> > determined that FF does not and IE does at the moment. So it appears
> > the test is about the browser not the objects.
>
> But you are calling specific objects to get the sound, are you not?
> Therefore, test for those objects.
The object that I am interested in is the alert() method of the
javascript Window object and that is there in all cases, so testing
for it's existence doesn't help me. My issue is that the alert()
method on non IE browsers is silent so I need to know what the browser
is, not whether the object exists.
Do you mean testing for the existence of the java objects? Interesting
but probably not the solution as they could be there whether the
alert() method is silent or not.
Anyway, how do you test for existence of an object? Reference it and
catch an exception if it is not there?
|