|
|||||||
| HTML Discussion and technical support for building, using and deploying HTML sites. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
The <OBJECT> tag
Hi all,
I hope someone will be able to help we this problem: Basically, what I want to do is to call a javascript function in the <OBJECT> tag, when the ActiveX content of this tag failed to load. That means: <OBJECT CLASSID="some-class-id" ODEBASE="some-codebase"> <PARAM name="some-param" value="some-value"> <!-- If user stop while the ActiveX loading, this part is called --> AND HERE I WANT TO CALL JAVASCRIPT FUNCTION, IE: <script>load_failed();</script> </OBJECT> But it looks like, tha javascript is not working inside of the object tag. I want this javascript function to be called automatically, without any user input. Does anybody know how to do it ? Thanks for any help. Marek |
|
#2
|
|||
|
|||
|
Re: The <OBJECT> tag
Quote:
You can't suddenly switch to the alternate content of an <object> tag. The alternate content is only supposed to come in effect if the main content (in this case your ActiveX) is not understood by the browser. In your case you are already in a state where the main content is accepted by the browser and the external resource have begun to download. In short, you have to figure out another method to get the "download canseled" trigger.
__________________
// Stefan Huszics |
|
#3
|
|||
|
|||
|
Quote:
None of onError= onStop= onAbort= is actually valid HTML http://www.w3.org/TR/html4/interact/....html#h-18.2.3 But since we are dealing with ActiveX, I guess the original poster isn't too concerned with cross browser compability anyway.
__________________
// Stefan Huszics |
|
#4
|
|||
|
|||
|
Quote:
The problem isn't that you offer people help and provide them with invalid code that works in some browsers, the problem is that you don TELL people that your solution consists of proprietary code.
__________________
// Stefan Huszics |
|
#5
|
|||
|
|||
|
Quote:
You never know where your code will end up, thus pointing out the flaws in it might save the person trying to use it a lot of headache.
__________________
// Stefan Huszics Last edited by Stefan; 12-06-2002 at 08:41 AM. |
|
#6
|
||||
|
||||
|
From the HTML 4.01 W3C RECOMMENDATION:
Quote:
Netscape has supported the following events since JavaScript 1.0 (asterisks indicate included in W3C recommendation): onAbort onBlur * onChange * onClick * onDblClick * onDragDrop onError onFocus * onKeyDown * onKeyPress * onKeyUp * onLoad * onMouseDown * onMouseMove * onMouseOut * onMouseOver * onMouseUp * onMove onReset * onResize onSelect * onSubmit * onUnload * IE supports these and a ton more. A lot of the ones that W3C does not include in their recommendation have to do with window objects. In fact, they do not enter the window object realm at all. They are only interested in the document (and perhaps rightly so). |
|
#7
|
|||
|
|||
|
Quote:
The point here is that there is a right way to do it (that will give you valid code) and a wrong way (generally prefered by clark). Even the very MS documentation page he links to shows how to add eg onerror the right way, he just likes to break the specs for the hell of it. http://msdn.microsoft.com/workshop/a...ts/onerror.asp eg <script> ... hepp.onerror= ... </script> <object id="hepp"...
__________________
// Stefan Huszics Last edited by Stefan; 12-06-2002 at 09:56 AM. |
|
#8
|
||||
|
||||
|
If it works (and it does -- as testified to by the person I helped), then it is valid
Quote:
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|