Prevent object from being download 
Author Message
 Prevent object from being download

I used a trial-and-error method to check whether the MS Agent components are
installed in the user machine.  I force the object to perform some task and
then trap the error number to determine the object being installed or not.
The problem is that the browser will always ask me whether I want to
download the object and I don't want that message to come up at all.  I want
to make it that if the object is not there, then fall through to the next
statement without interruption.  Do anyone know how to prevent the browser
to ask me that question?  Thank you!


Fri, 01 Mar 2002 03:00:00 GMT  
 Prevent object from being download

Quote:
> I used a trial-and-error method to check whether the MS Agent components
are
> installed in the user machine.  I force the object to perform some task
and
> then trap the error number to determine the object being installed or not.
> The problem is that the browser will always ask me whether I want to
> download the object and I don't want that message to come up at all.  I
want
> to make it that if the object is not there, then fall through to the next
> statement without interruption.  Do anyone know how to prevent the browser
> to ask me that question?  Thank you!

Hi,

If you use CreateObject in script, rather than the <object> tag, then you
will not be prompted to download the object - it will just fail.

Peter

--
Peter J. Torr - Microsoft Windows Script Program Manager

Please do not e-mail me with questions - post them to this
newsgroup instead. Thankyou!



Sat, 02 Mar 2002 03:00:00 GMT  
 Prevent object from being download



Quote:


> > I used a trial-and-error method to check whether the MS Agent components
> are
> > installed in the user machine.  I force the object to perform some task
> and
> > then trap the error number to determine the object being installed or not.
> > The problem is that the browser will always ask me whether I want to
> > download the object and I don't want that message to come up at all.  I
> want
> > to make it that if the object is not there, then fall through to the next
> > statement without interruption.  Do anyone know how to prevent the browser
> > to ask me that question?  Thank you!

> Hi,

> If you use CreateObject in script, rather than the <object> tag, then you
> will not be prompted to download the object - it will just fail.

But it will fail with an error, in which case unless you are running IE5,
that's not a lot of good is it?  wouldn't it be better to just do it with an
object tag without the codebase part? which won't prompt a download will it?
And won't throw an error and you can test the agent object without throwing
any errors.

Jim



Sat, 02 Mar 2002 03:00:00 GMT  
 Prevent object from being download
I solved the problem by using the combination of On Error Resume Next,
CreatObject method, and the IsObject() check.  That works fine for me.  I
think from IE4 on this combination of code should work and IE4 is all I care
about in this project.  Thank you very much for everyone's help!  I really
do appreciate that.

Lennart


Quote:





> > > I used a trial-and-error method to check whether the MS Agent
components
> > are
> > > installed in the user machine.  I force the object to perform some
task
> > and
> > > then trap the error number to determine the object being installed or
not.
> > > The problem is that the browser will always ask me whether I want to
> > > download the object and I don't want that message to come up at all.
I
> > want
> > > to make it that if the object is not there, then fall through to the
next
> > > statement without interruption.  Do anyone know how to prevent the
browser
> > > to ask me that question?  Thank you!

> > Hi,

> > If you use CreateObject in script, rather than the <object> tag, then
you
> > will not be prompted to download the object - it will just fail.

> But it will fail with an error, in which case unless you are running IE5,
> that's not a lot of good is it?  wouldn't it be better to just do it with
an
> object tag without the codebase part? which won't prompt a download will
it?
> And won't throw an error and you can test the agent object without
throwing
> any errors.

> Jim



Sat, 02 Mar 2002 03:00:00 GMT  
 Prevent object from being download

Quote:
> > If you use CreateObject in script, rather than the <object> tag, then
you
> > will not be prompted to download the object - it will just fail.

> But it will fail with an error, in which case unless you are running IE5,
> that's not a lot of good is it?

Good point. Upgrades are the answer ;-)

Peter

--
Peter J. Torr - Microsoft Windows Script Program Manager

Please do not e-mail me with questions - post them to this
newsgroup instead. Thankyou!



Sat, 02 Mar 2002 03:00:00 GMT  
 Prevent object from being download

Quote:
> > If you use CreateObject in script, rather than the <object> tag, then
you
> > will not be prompted to download the object - it will just fail.

> But it will fail with an error, in which case unless you are running IE5,
> that's not a lot of good is it?

Hi,

Actually, come to think of it, I read this first in a non-JScript group, and
as you can see, I used "CreateObject" (not "new ActiveXObject").

So you could use "On Error Resume Next" in VBScript and you'd be fine in IE
3 and 4 as well. And you wouldn't care about Navigator, because you're using
ActiveX controls.

Peter

--
Peter J. Torr - Microsoft Windows Script Program Manager

Please do not e-mail me with questions - post them to this
newsgroup instead. Thankyou!



Sat, 02 Mar 2002 03:00:00 GMT  
 Prevent object from being download



Quote:


> > > If you use CreateObject in script, rather than the <object> tag, then
> you
> > > will not be prompted to download the object - it will just fail.

> > But it will fail with an error, in which case unless you are running IE5,
> > that's not a lot of good is it?

> Hi,

> Actually, come to think of it, I read this first in a non-JScript group, and
> as you can see, I used "CreateObject" (not "new ActiveXObject").

Fair comment, I read it only in a JScript group, and as he'd mentioned
webpages just assumed you were losing your marbles and didn't feel the need to
point it out...  :-)

Quote:

> So you could use "On Error Resume Next" in VBScript and you'd be fine in IE
> 3 and 4 as well. And you wouldn't care about Navigator, because you're using
> ActiveX controls.

Ah.. but I read this in a JScript group, and I'm still ignoring Navigator - I
only installed it today for the first time in months to do the demo mentioned
in the other thread and to check that new Layer() did work as I remembered
before posting it...  I try and forget about navigator as much as possible...
I hadn't noticed it was going outside of a JScript group...

My only problems with the Agent control, is that for some reason he won't
co-exist with my own ActiveX control in the same window...

Jim.



Sat, 02 Mar 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Prevent object from being download

2. Prevent download

3. How can I prevent Inet Control to use cache while downloading a file using http protocol

4. Recordset object, what am i doing wrong?

5. How can I prevent RichTextBox to accept objects?

6. HOWTO: Prevent flicker in TreeView control when changing the .Image property of a Node object

7. Preventing object selection in CRViewer 9

8. HOWTO: Prevent flicker in TreeView control when changing the .Image property of a Node object

9. HOWTO: Prevent flicker in TreeView control when changing the .Image property of a Node object

10. I am trying to update a record, i am not using data control

11. I am learning VB.NET and am wondering....

12. I am trying to update a record, i am not using data control

 

 
Powered by phpBB® Forum Software