Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > JavaScript and Components on Pages

Reply
Thread Tools

JavaScript and Components on Pages

 
 
Alex Maghen
Guest
Posts: n/a
 
      02-12-2008
Is there an Event in a page's life-cycle where I would be able to reference
all of the objects that were instantiated on a page, but as soon as possible
after the page loads? If I try to use OnLoad for the Document, objects like
ActiveX controls don't seem to "exist" yet on the page.

Ideas? Thanks.

Alex
 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      02-12-2008
"Alex Maghen" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> Is there an Event in a page's life-cycle where I would be able to

reference
> all of the objects that were instantiated on a page, but as soon as

possible
> after the page loads? If I try to use OnLoad for the Document, objects

like
> ActiveX controls don't seem to "exist" yet on the page.
>


Which OnLoad event are you talking about exactly? Can you show use some
code? The elements holding the ActiveX controls will exist at the time the
client side window.onload event fires. Whether the contents of the elements
have been initialised and ready for use at the point is another matter.


--
Anthony Jones - MVP ASP/ASP.NET


 
Reply With Quote
 
 
 
 
Michael Nemtsev [MVP]
Guest
Posts: n/a
 
      02-12-2008
Hello Alex,

I would use the AJAX Sys.Application.add_load event for this

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


AM> Is there an Event in a page's life-cycle where I would be able to
AM> reference all of the objects that were instantiated on a page, but
AM> as soon as possible after the page loads? If I try to use OnLoad for
AM> the Document, objects like ActiveX controls don't seem to "exist"
AM> yet on the page.
AM>
AM> Ideas? Thanks.
AM>
AM> Alex
AM>


 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      02-12-2008
there iisn't an event for this. active/x control are loaded async. the onload
event means the html has been parsed, and the dom created, but images, and
active/x controls may not be ready yet (or even downloaded).

all IE hosted objects have a readyState property and an onreadystatechange
event. you can use to talk to the active/x control after its loaded and
initialized:

<object onreadystatechange="onReady(this)" ... />

function onReady(e)
{
if (e.readyState == 4)
{
// control is live
// do something here
}
}


-- bruce (sqlwork.com)


"Alex Maghen" wrote:

> Is there an Event in a page's life-cycle where I would be able to reference
> all of the objects that were instantiated on a page, but as soon as possible
> after the page loads? If I try to use OnLoad for the Document, objects like
> ActiveX controls don't seem to "exist" yet on the page.
>
> Ideas? Thanks.
>
> Alex

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      02-13-2008
Hi Alex,

As other members have said, Activex control are hosted by client side
webbrowser, server side ASP.NET doesn't have much control on it. However,
if you only want to manipulate some setting or attributes in its html
markup, you can considering use page's "PreRender" event. This event is the
last event you can modify control states of controls on Page(will be
persisted into Viewstate) before Render stage.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?QWxleCBNYWdoZW4=?= <(E-Mail Removed)>
>Subject: JavaScript and Components on Pages
>Date: Mon, 11 Feb 2008 23:41:01 -0800


>
>Is there an Event in a page's life-cycle where I would be able to

reference
>all of the objects that were instantiated on a page, but as soon as

possible
>after the page loads? If I try to use OnLoad for the Document, objects

like
>ActiveX controls don't seem to "exist" yet on the page.
>
>Ideas? Thanks.
>
>Alex
>


 
Reply With Quote
 
Steven Cheng
Guest
Posts: n/a
 
      02-16-2008
Hi Alex,

Do you have any further question on this thread? If so, welcome to post
here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: http://www.velocityreviews.com/forums/(E-Mail Removed) (Steven Cheng[MSFT])
>Organization: Microsoft
>Date: Wed, 13 Feb 2008 02:46:37 GMT
>Subject: RE: JavaScript and Components on Pages


>
>Hi Alex,
>
>As other members have said, Activex control are hosted by client side
>webbrowser, server side ASP.NET doesn't have much control on it. However,
>if you only want to manipulate some setting or attributes in its html
>markup, you can considering use page's "PreRender" event. This event is

the
>last event you can modify control states of controls on Page(will be
>persisted into Viewstate) before Render stage.
>
>Sincerely,
>
>Steven Cheng
>
>Microsoft MSDN Online Support Lead
>
>
>This posting is provided "AS IS" with no warranties, and confers no rights.
>
>--------------------
>>From: =?Utf-8?B?QWxleCBNYWdoZW4=?= <(E-Mail Removed)>
>>Subject: JavaScript and Components on Pages
>>Date: Mon, 11 Feb 2008 23:41:01 -0800

>
>>
>>Is there an Event in a page's life-cycle where I would be able to

>reference
>>all of the objects that were instantiated on a page, but as soon as

>possible
>>after the page loads? If I try to use OnLoad for the Document, objects

>like
>>ActiveX controls don't seem to "exist" yet on the page.
>>
>>Ideas? Thanks.
>>
>>Alex
>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing components on other pages CJ ASP .Net 3 12-09-2005 03:20 PM
SWING components adjustment in different resolutions - Should show scrollbars less than 800X600 and expand components over this resolution Bluetears76 Java 1 07-01-2004 09:01 PM
Can Choice components respond to keyboard input like HTML Choice components? Mickey Segal Java 0 02-02-2004 10:59 PM
Accessing DCOM components from the code behind pages and using sessions to store DCOM object handles Alex ASP .Net 3 12-02-2003 01:34 AM
Are any server components needed to publish ASP.NET pages? Dickie Black ASP .Net 0 08-06-2003 10:33 AM



Advertisments