Steve,
It's possible. The first thing you have to do is find the running
instance of internet explorer (I don't know how you would do it for other
browsers). Knowledge base article 176792 titled "How To Connect to a
Running Instance of Internet Explorer" tells you how to do this. You can
find it here (watch for line wrap):
http://support.microsoft.com/kb/176792/EN-US/
The example is for VB6, but it's easy enough to convert it to .NET.
Once you have that, you have access to the browser, and the object model
of the document in the browser. Finding your javascript code an executing
it (through the document object model) is a breeze after that.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard. caspershouse.co m
"SteveS" <St****@discuss ions.microsoft. com> wrote in message
news:AD******** *************** ***********@mic rosoft.com...
What would you like to know? Maybe an example will help:
Let's say we have a web page with a javascript function called
"Hello(name )"
The function takes the variable "name" and pops the value up in an alert
box.
Then in a windows app, I have a form with a textbox and a button.
I want to be able to enter a value into the textbox located on the form
and
when I press the button, have the value passed directly into the
javascript
function located in the web page.
Couple of caveats:
1) This is a standalone instance of a browser - not a browser embedded in
another app
2) I would like to invoke the javascript directly (i.e. No page refresh
due
to GET/POST)
Am I dreaming? Can this be done?
"Vadivel Kumar" wrote:
You can do this. But need more information about this issue.
Regards
Vadivel Kumar
"SteveS" <St****@discuss ions.microsoft. com> wrote in message
news:2A******** *************** ***********@mic rosoft.com... > Does anyone know if it is possible to invoke a Javascript function in a
web > page from an external application? I've got some data that I want to
> pass
> from a windows application to a web page without refreshing the page
> (thus
> the javascript function).
>
> Any other possible methodologies that anyone could suggest?
>
> Has anyone done anything like this?