call jscript function on webbrowser page 
Author Message
 call jscript function on webbrowser page

Hi all,
I'm wondering if there's a way to call a javascript
function to run on the page currently displayed in
webbrowser control. This function is in the actual page, I
just need to call it to run. Is this possible?

To explain:
I'd like to call a page and fill in a form using the
HTMLElements collection. The problem is that when manually
doing it, some javascript is run onchange of a field.
Obviously, when programmatically filling this field, the
onchange event doesn't occur and therefore the jscript
doesn't run. So, back to my question: Can I call the
jscript function from vb to run on the currently loaded
page?

TIA
Sara



Mon, 12 Apr 2004 22:31:50 GMT  
 call jscript function on webbrowser page
hi
you know what you could do is make a call to the jscript function in an
event handler
so for instance your function would be called automatically when the
document was completely loaded if you made a call to it in the BODY OnLoad
event
also you could dynamically create a nutton that when clicked calls your
function
hope this helps

Saurabh


Quote:
> Hi all,
> I'm wondering if there's a way to call a javascript
> function to run on the page currently displayed in
> webbrowser control. This function is in the actual page, I
> just need to call it to run. Is this possible?

> To explain:
> I'd like to call a page and fill in a form using the
> HTMLElements collection. The problem is that when manually
> doing it, some javascript is run onchange of a field.
> Obviously, when programmatically filling this field, the
> onchange event doesn't occur and therefore the jscript
> doesn't run. So, back to my question: Can I call the
> jscript function from vb to run on the currently loaded
> page?

> TIA
> Sara



Mon, 12 Apr 2004 23:36:23 GMT  
 call jscript function on webbrowser page
Thanx for the reply!
Do you mean I could call it in an event handler on the
actual web page or in my vb app? I can't do it on web page
b/c it's a third party site over which I have no control.
Can I do it from vb?

Sara

Quote:
>-----Original Message-----
>hi
>you know what you could do is make a call to the jscript
function in an
>event handler
>so for instance your function would be called

automatically when the
Quote:
>document was completely loaded if you made a call to it
in the BODY OnLoad
>event
>also you could dynamically create a nutton that when
clicked calls your
>function
>hope this helps

>Saurabh



>> Hi all,
>> I'm wondering if there's a way to call a javascript
>> function to run on the page currently displayed in
>> webbrowser control. This function is in the actual
page, I
>> just need to call it to run. Is this possible?

>> To explain:
>> I'd like to call a page and fill in a form using the
>> HTMLElements collection. The problem is that when
manually
>> doing it, some javascript is run onchange of a field.
>> Obviously, when programmatically filling this field, the
>> onchange event doesn't occur and therefore the jscript
>> doesn't run. So, back to my question: Can I call the
>> jscript function from vb to run on the currently loaded
>> page?

>> TIA
>> Sara

>.



Tue, 13 Apr 2004 02:10:28 GMT  
 call jscript function on webbrowser page
hi
im assuming youre opening this web page in your webbrowser control
in this case you could use the MSHTML object library to initially manipulate
the web page and actually add your own code into it and then display it in
the webbrowser control
that way when the page shows up it will have your code in it as well
and as i mentioned you could put in a button or something that fires the
jscript function on the page itself.

itll take some time to get used to the MSHTL stuff but if you run a search
in GOOGLE then you will find some snippets thatll help

Saurabh


Quote:
> Thanx for the reply!
> Do you mean I could call it in an event handler on the
> actual web page or in my vb app? I can't do it on web page
> b/c it's a third party site over which I have no control.
> Can I do it from vb?

> Sara
> >-----Original Message-----
> >hi
> >you know what you could do is make a call to the jscript
> function in an
> >event handler
> >so for instance your function would be called
> automatically when the
> >document was completely loaded if you made a call to it
> in the BODY OnLoad
> >event
> >also you could dynamically create a nutton that when
> clicked calls your
> >function
> >hope this helps

> >Saurabh



> >> Hi all,
> >> I'm wondering if there's a way to call a javascript
> >> function to run on the page currently displayed in
> >> webbrowser control. This function is in the actual
> page, I
> >> just need to call it to run. Is this possible?

> >> To explain:
> >> I'd like to call a page and fill in a form using the
> >> HTMLElements collection. The problem is that when
> manually
> >> doing it, some javascript is run onchange of a field.
> >> Obviously, when programmatically filling this field, the
> >> onchange event doesn't occur and therefore the jscript
> >> doesn't run. So, back to my question: Can I call the
> >> jscript function from vb to run on the currently loaded
> >> page?

> >> TIA
> >> Sara

> >.



Tue, 13 Apr 2004 03:08:12 GMT  
 call jscript function on webbrowser page
Hi, thanx again. OK, I took your suggestion and did a
search on google. After going through 42 pages of results
(!), I found one that helped slightly. Do you by any
chance know where I could find more info on this, and
specifically applies to VB because most stuff I found was
for VC++ which I don't know.
Thanx for any help, I'm going out of my mind!
Quote:
>-----Original Message-----
>hi
>im assuming youre opening this web page in your
webbrowser control
>in this case you could use the MSHTML object library to

initially manipulate
Quote:
>the web page and actually add your own code into it and
then display it in
>the webbrowser control
>that way when the page shows up it will have your code in
it as well
>and as i mentioned you could put in a button or something
that fires the
>jscript function on the page itself.

>itll take some time to get used to the MSHTL stuff but if
you run a search
>in GOOGLE then you will find some snippets thatll help

>Saurabh



>> Thanx for the reply!
>> Do you mean I could call it in an event handler on the
>> actual web page or in my vb app? I can't do it on web
page
>> b/c it's a third party site over which I have no
control.
>> Can I do it from vb?

>> Sara
>> >-----Original Message-----
>> >hi
>> >you know what you could do is make a call to the
jscript
>> function in an
>> >event handler
>> >so for instance your function would be called
>> automatically when the
>> >document was completely loaded if you made a call to it
>> in the BODY OnLoad
>> >event
>> >also you could dynamically create a nutton that when
>> clicked calls your
>> >function
>> >hope this helps

>> >Saurabh



>> >> Hi all,
>> >> I'm wondering if there's a way to call a javascript
>> >> function to run on the page currently displayed in
>> >> webbrowser control. This function is in the actual
>> page, I
>> >> just need to call it to run. Is this possible?

>> >> To explain:
>> >> I'd like to call a page and fill in a form using the
>> >> HTMLElements collection. The problem is that when
>> manually
>> >> doing it, some javascript is run onchange of a field.
>> >> Obviously, when programmatically filling this field,
the
>> >> onchange event doesn't occur and therefore the
jscript
>> >> doesn't run. So, back to my question: Can I call the
>> >> jscript function from vb to run on the currently
loaded
>> >> page?

>> >> TIA
>> >> Sara

>> >.

>.



Tue, 13 Apr 2004 04:36:25 GMT  
 call jscript function on webbrowser page
hi
it sucks coz theres only one site and thats the abstractvb site
even MS doesnt document this stuff that much
basically my advice would be to use tgar one example on abstractvb.com and
figure out how to use other objects in the MSHTML library
if i find some good links or even help files ill send them over to you
is that cool
sorry if i cant help much, im too busy pulling my hair out trying to find a
new job

Saurabh


Quote:
> Hi, thanx again. OK, I took your suggestion and did a
> search on google. After going through 42 pages of results
> (!), I found one that helped slightly. Do you by any
> chance know where I could find more info on this, and
> specifically applies to VB because most stuff I found was
> for VC++ which I don't know.
> Thanx for any help, I'm going out of my mind!
> >-----Original Message-----
> >hi
> >im assuming youre opening this web page in your
> webbrowser control
> >in this case you could use the MSHTML object library to
> initially manipulate
> >the web page and actually add your own code into it and
> then display it in
> >the webbrowser control
> >that way when the page shows up it will have your code in
> it as well
> >and as i mentioned you could put in a button or something
> that fires the
> >jscript function on the page itself.

> >itll take some time to get used to the MSHTL stuff but if
> you run a search
> >in GOOGLE then you will find some snippets thatll help

> >Saurabh



> >> Thanx for the reply!
> >> Do you mean I could call it in an event handler on the
> >> actual web page or in my vb app? I can't do it on web
> page
> >> b/c it's a third party site over which I have no
> control.
> >> Can I do it from vb?

> >> Sara
> >> >-----Original Message-----
> >> >hi
> >> >you know what you could do is make a call to the
> jscript
> >> function in an
> >> >event handler
> >> >so for instance your function would be called
> >> automatically when the
> >> >document was completely loaded if you made a call to it
> >> in the BODY OnLoad
> >> >event
> >> >also you could dynamically create a nutton that when
> >> clicked calls your
> >> >function
> >> >hope this helps

> >> >Saurabh



> >> >> Hi all,
> >> >> I'm wondering if there's a way to call a javascript
> >> >> function to run on the page currently displayed in
> >> >> webbrowser control. This function is in the actual
> >> page, I
> >> >> just need to call it to run. Is this possible?

> >> >> To explain:
> >> >> I'd like to call a page and fill in a form using the
> >> >> HTMLElements collection. The problem is that when
> >> manually
> >> >> doing it, some javascript is run onchange of a field.
> >> >> Obviously, when programmatically filling this field,
> the
> >> >> onchange event doesn't occur and therefore the
> jscript
> >> >> doesn't run. So, back to my question: Can I call the
> >> >> jscript function from vb to run on the currently
> loaded
> >> >> page?

> >> >> TIA
> >> >> Sara

> >> >.

> >.



Tue, 13 Apr 2004 22:54:21 GMT  
 call jscript function on webbrowser page
Thanx
Good luck with the job hunting!
Sara
Quote:
>-----Original Message-----
>hi
>it sucks coz theres only one site and thats the
abstractvb site
>even MS doesnt document this stuff that much
>basically my advice would be to use tgar one example on
abstractvb.com and
>figure out how to use other objects in the MSHTML library
>if i find some good links or even help files ill send
them over to you
>is that cool
>sorry if i cant help much, im too busy pulling my hair

out trying to find a
Quote:
>new job

>Saurabh



>> Hi, thanx again. OK, I took your suggestion and did a
>> search on google. After going through 42 pages of
results
>> (!), I found one that helped slightly. Do you by any
>> chance know where I could find more info on this, and
>> specifically applies to VB because most stuff I found
was
>> for VC++ which I don't know.
>> Thanx for any help, I'm going out of my mind!
>> >-----Original Message-----
>> >hi
>> >im assuming youre opening this web page in your
>> webbrowser control
>> >in this case you could use the MSHTML object library to
>> initially manipulate
>> >the web page and actually add your own code into it and
>> then display it in
>> >the webbrowser control
>> >that way when the page shows up it will have your code
in
>> it as well
>> >and as i mentioned you could put in a button or
something
>> that fires the
>> >jscript function on the page itself.

>> >itll take some time to get used to the MSHTL stuff but
if
>> you run a search
>> >in GOOGLE then you will find some snippets thatll help

>> >Saurabh



>> >> Thanx for the reply!
>> >> Do you mean I could call it in an event handler on
the
>> >> actual web page or in my vb app? I can't do it on web
>> page
>> >> b/c it's a third party site over which I have no
>> control.
>> >> Can I do it from vb?

>> >> Sara
>> >> >-----Original Message-----
>> >> >hi
>> >> >you know what you could do is make a call to the
>> jscript
>> >> function in an
>> >> >event handler
>> >> >so for instance your function would be called
>> >> automatically when the
>> >> >document was completely loaded if you made a call
to it
>> >> in the BODY OnLoad
>> >> >event
>> >> >also you could dynamically create a nutton that when
>> >> clicked calls your
>> >> >function
>> >> >hope this helps

>> >> >Saurabh



>> >> >> Hi all,
>> >> >> I'm wondering if there's a way to call a
javascript
>> >> >> function to run on the page currently displayed in
>> >> >> webbrowser control. This function is in the actual
>> >> page, I
>> >> >> just need to call it to run. Is this possible?

>> >> >> To explain:
>> >> >> I'd like to call a page and fill in a form using
the
>> >> >> HTMLElements collection. The problem is that when
>> >> manually
>> >> >> doing it, some javascript is run onchange of a
field.
>> >> >> Obviously, when programmatically filling this
field,
>> the
>> >> >> onchange event doesn't occur and therefore the
>> jscript
>> >> >> doesn't run. So, back to my question: Can I call
the
>> >> >> jscript function from vb to run on the currently
>> loaded
>> >> >> page?

>> >> >> TIA
>> >> >> Sara

>> >> >.

>> >.

>.



Sat, 17 Apr 2004 04:05:09 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. call a jscript-function in the vbscript-part of an asp-page

2. Calling JScript method in WebBrowser Control from VBA

3. calling vbscript function from jscript

4. Calling JScript function

5. calling vbscript function from jscript?

6. Calling a function defined in a linked JScript file

7. Call JScript function from VBScript

8. Calling Jscript Function from Vbscript?

9. Calling a JSCRIPT From a VBScript Function

10. Calling VB function from jscript/vbscript?

11. Calling Page setup from Webbrowser control

12. Does VBScript has a function similar to JScript function eval

 

 
Powered by phpBB® Forum Software