General discussion

Locked

Help needed in ASP application

By mohan.bedekar ·
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 <BODY ONLOAD= OnLoad()> 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.

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Help needed in ASP application

by pol In reply to Help needed in ASP applic ...

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.

Collapse -

Help needed in ASP application

by mohan.bedekar In reply to Help needed in ASP applic ...

The question was auto-closed by TechRepublic

Collapse -

Help needed in ASP application

by hemant_bhatt In reply to Help needed in ASP applic ...

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

Collapse -

Help needed in ASP application

by mohan.bedekar In reply to Help needed in ASP applic ...

The question was auto-closed by TechRepublic

Collapse -

Help needed in ASP application

by glenndal In reply to Help needed in ASP applic ...

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

Collapse -

Help needed in ASP application

by mohan.bedekar In reply to Help needed in ASP applic ...

The question was auto-closed by TechRepublic

Collapse -

Help needed in ASP application

by DaveMcRae In reply to Help needed in ASP applic ...

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.

Collapse -

Help needed in ASP application

by mohan.bedekar In reply to Help needed in ASP applic ...

The question was auto-closed by TechRepublic

Collapse -

Help needed in ASP application

by mohan.bedekar In reply to Help needed in ASP applic ...

This question was auto closed due to inactivity

Back to Web Development Forum
9 total posts (Page 1 of 1)  

Related Forums