I am trying to load two different activex objects using the html object tag. the problem is: if the first object tag loads the activex object, then the second should not load. the following html-
<object id='a' classid='......'></object>
<object id='b' classid='......'></object>
This will load both objects. I want to load object 'b' only if object 'a' is not available.
(if none of the object is available, then we should show an IE information bar asking to download the activeX object from a given location). Any solution ? Thank you (User2531191).
Yes,
<object>
was designed for exactly this purpose. See W3C reference.The trick is to nest the "plan B" object inside the main object.
Then it handles
b
only whena
fails for whatever reason. Otherwise, only objecta
is shown and the content of elementa
is ignored.And you can take the nesting deeper if you want, showing object
c
if neithera
norb
works, or finally showing the text if everything else fails.