Discussion Locked

Help needed in ASP application

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
we are developing an Internet based application. In which we have made some Activex controls and we are embeding those controls in our ASp files. we are using HTML tag for populating the control . we have our existing system on IE3 but now we are migrating it to IE5. the problem is when the ASP runs the code gets executed faster then the control gets downloaded and since we are using the properties of the control it trhougs errors that Invalid statement . is there an wayt o know in ASP when the control is downloaded fully so that we can ensure that the code written in OnLoad() Sub will execute after that.

9 replies

by pol

Try another Event "onreadystatechange"

but it's applies to
Applies To
APPLET, EMBED, IMG, LINK, OBJECT, SCRIPT, STYLE, document

and not to body

so ,try for document ,if it is dosn't work
try for object.

by hemant_bhatt

Hi Mohan,

I have had similer problems in the past an successfully resolved them.

You can use window.setTimeOut property while you are populating the ActiveX controls. Ti works!!!!

Hemant

by glenndal

In your function called from onLoad, try
something like this...

function onLoad() {

if(document.all.ACTIVEXOBJECTNAME) {
// code with aX initialisations
} else {
setTimeout('onLoad()',1000)
}
}

just replace ACTIVEXOBJECTNAME with the name
you used in your object ID="???" parameter.
If the object is not ready to receive data
then the script won't find it, and will try
again in one sec

by davemcrae

You could either set Response.Buffer=true or (I found this works well for my javaScript, a bit of cheat) put your OnLoad() Sub at the very end of the generated page.
The other answers are good too.

This discussion is closed to new replies.