Using XMLHTTPRequest within Firefox (Newbie)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Using XMLHTTPRequest within Firefox (Newbie)

Dave F.-3
Hi

I use MSXML.XMLHTTPRequest in an Excel VBA routine to download info from
a web page using responseText.

I'd like to swap over from IE & use Firefox instead. Is this possible?
I looked for a Mozilla object library but couldn't see one. Would I have
to load it manually?

I've done some basic Google searching but unearthed nothing to get me
started.

Please point me in the right direction.

Thanks

Dave F.
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Using XMLHTTPRequest within Firefox (Newbie)

Anthony Jones-10

"Dave F." <[hidden email]> wrote in message
news:[hidden email]...

> Hi
>
> I use MSXML.XMLHTTPRequest in an Excel VBA routine to download info from
> a web page using responseText.
>
> I'd like to swap over from IE & use Firefox instead. Is this possible?
> I looked for a Mozilla object library but couldn't see one. Would I have
> to load it manually?
>
> I've done some basic Google searching but unearthed nothing to get me
> started.
>
> Please point me in the right direction.
>

Where your code currently says:-

var xmlhttp = new ActiveXObject("MSXML.XMLHTTP")

replace it with

var xmlhttp = new XMLHttpRequest()

Thats it.




--
Anthony Jones - MVP ASP/ASP.NET


_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Using XMLHTTPRequest within Firefox (Newbie)

Martin Honnen-3
In reply to this post by Dave F.-3
Dave F. wrote:

> I use MSXML.XMLHTTPRequest in an Excel VBA routine to download info from
> a web page using responseText.
>
> I'd like to swap over from IE & use Firefox instead. Is this possible?

If you use MSXML.XMLHttpRequest in an Excel VBA then you are not using
IE at all, you are using VBA and MSXML. So I don't understand what you
are doing where you would want to switch from IE to Firefox.

--

        Martin Honnen
        http://JavaScript.FAQTs.com/
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Using XMLHTTPRequest within Firefox (Newbie)

Anthony Jones-10
"Martin Honnen" <[hidden email]> wrote in message
news:[hidden email]...

> Dave F. wrote:
>
> > I use MSXML.XMLHTTPRequest in an Excel VBA routine to download info from
> > a web page using responseText.
> >
> > I'd like to swap over from IE & use Firefox instead. Is this possible?
>
> If you use MSXML.XMLHttpRequest in an Excel VBA then you are not using
> IE at all, you are using VBA and MSXML. So I don't understand what you
> are doing where you would want to switch from IE to Firefox.
>

Perhaps if we substitute "IE" with "Microsoft's HTTP Stack" it might make
more sense.

I don't think it is currently possible to utalise the Mozilla HTTP stack
from VBA.  It would require a COM wrapper at least and I doubt such a thing
exitst.

--
Anthony Jones - MVP ASP/ASP.NET


_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Using XMLHTTPRequest within Firefox (Newbie)

Dave F.-3
In reply to this post by Martin Honnen-3
Martin Honnen wrote:

> Dave F. wrote:
>
>> I use MSXML.XMLHTTPRequest in an Excel VBA routine to download info from
>> a web page using responseText.
>>
>> I'd like to swap over from IE & use Firefox instead. Is this possible?
>
> If you use MSXML.XMLHttpRequest in an Excel VBA then you are not using
> IE at all, you are using VBA and MSXML. So I don't understand what you
> are doing where you would want to switch from IE to Firefox.
>

Err...
Please correct me if i'm wrong but I thought MSXML was a part of the Web
browser install.

Due to the vagaries of IE7, the secure web page I wish to download from
requires me to manually logon first.
It won't let me do this via "post".

I have to do this using IE7. I've tried FF 7. It doesn't work.

Snip of code:

   Dim http As New MSXML.XMLHTTPRequest
   http.Open "post", "http://www.advfn.com/blah,blah,blah", False,
"Username", "Password"
   http.send
   Str = http.responseText

If you know of a better way please tell me. preferably with FF.

Thanks
Dave F.
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Using XMLHTTPRequest within Firefox (Newbie)

Dave F.-3
In reply to this post by Anthony Jones-10
Anthony Jones wrote:

> "Dave F." <[hidden email]> wrote in message
> news:[hidden email]...
>> Hi
>>
>> I use MSXML.XMLHTTPRequest in an Excel VBA routine to download info from
>> a web page using responseText.
>>
>> I'd like to swap over from IE & use Firefox instead. Is this possible?
>> I looked for a Mozilla object library but couldn't see one. Would I have
>> to load it manually?
>>
>> I've done some basic Google searching but unearthed nothing to get me
>> started.
>>
>> Please point me in the right direction.
>>
>
> Where your code currently says:-
>
> var xmlhttp = new ActiveXObject("MSXML.XMLHTTP")
>
> replace it with
>
> var xmlhttp = new XMLHttpRequest()
>
> Thats it.
>

I had go but with no success.

This is the code I'm using at the moment.

Snip of code:

   Dim http As New MSXML.XMLHTTPRequest
   http.Open "post", "http://www.advfn.com/blah,blah,blah", False,
"Username", "Password"
   http.send
   Str = http.responseText

Any ideas?



_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Using XMLHTTPRequest within Firefox (Newbie)

Anthony Jones-10
In reply to this post by Dave F.-3
"Dave F." <[hidden email]> wrote in message
news:[hidden email]...
> Martin Honnen wrote:
> > Dave F. wrote:
> >
> >> I use MSXML.XMLHTTPRequest in an Excel VBA routine to download info
from

> >> a web page using responseText.
> >>
> >> I'd like to swap over from IE & use Firefox instead. Is this possible?
> >
> > If you use MSXML.XMLHttpRequest in an Excel VBA then you are not using
> > IE at all, you are using VBA and MSXML. So I don't understand what you
> > are doing where you would want to switch from IE to Firefox.
> >
>
> Err...
> Please correct me if i'm wrong but I thought MSXML was a part of the Web
> browser install.
>

Installing IE will install MSXML but there are other things that install
MSXML or indeed MSXML may be installed independantly.

>
> Due to the vagaries of IE7, the secure web page I wish to download from
> requires me to manually logon first.
> It won't let me do this via "post".
>
> I have to do this using IE7. I've tried FF 7. It doesn't work.

Whats FF 7?

>
> Snip of code:
>
>    Dim http As New MSXML.XMLHTTPRequest
>    http.Open "post", "http://www.advfn.com/blah,blah,blah", False,
> "Username", "Password"
>    http.send
>    Str = http.responseText
>

this code is using MSXML.  It isn't using a browser of any sort.

> If you know of a better way please tell me. preferably with FF.
>

Have you tried just using a GET instead of post or have you tried "POST"
instead of "post"?  You don't appear to be sending any data so GET would
seem to be the more likely method.

FF doesn't offer you anything here that can help.

--
Anthony Jones - MVP ASP/ASP.NET


_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Using XMLHTTPRequest within Firefox (Newbie)

Dave F.-3
Anthony Jones wrote:

> "Dave F." <[hidden email]> wrote in message
> news:[hidden email]...
>> Martin Honnen wrote:
>>> Dave F. wrote:
>>>
>>>> I use MSXML.XMLHTTPRequest in an Excel VBA routine to download info
> from
>>>> a web page using responseText.
>>>>
>>>> I'd like to swap over from IE & use Firefox instead. Is this possible?
>>> If you use MSXML.XMLHttpRequest in an Excel VBA then you are not using
>>> IE at all, you are using VBA and MSXML. So I don't understand what you
>>> are doing where you would want to switch from IE to Firefox.
>>>
>> Err...
>> Please correct me if i'm wrong but I thought MSXML was a part of the Web
>> browser install.
>>
>
> Installing IE will install MSXML but there are other things that install
> MSXML or indeed MSXML may be installed independantly.
>
>> Due to the vagaries of IE7, the secure web page I wish to download from
>> requires me to manually logon first.
>> It won't let me do this via "post".
>>
>> I have to do this using IE7. I've tried FF 7. It doesn't work.
>
> Whats FF 7?

Bag Typing. FF = FireFox. 7 = & without the shift being pressed.

>
>> Snip of code:
>>
>>    Dim http As New MSXML.XMLHTTPRequest
>>    http.Open "post", "http://www.advfn.com/blah,blah,blah", False,
>> "Username", "Password"
>>    http.send
>>    Str = http.responseText
>>
>
> this code is using MSXML.  It isn't using a browser of any sort.
>
>> If you know of a better way please tell me. preferably with FF.
>>
>
> Have you tried just using a GET instead of post or have you tried "POST"
> instead of "post"?  You don't appear to be sending any data so GET would
> seem to be the more likely method.
>
> FF doesn't offer you anything here that can help.
>
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml