473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Invoke JS function from extenal application

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?
Nov 16 '05 #1
4 2226
You can do this. But need more information about this issue.

Regards
Vadivel Kumar

"SteveS" <St****@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.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?

Nov 16 '05 #2
If you are hosting the Web Browser ActiveX control in your page, then yes,
I'm pretty sure you can. But if you mean have a Windows app gain access to
a normal browser window? Well that's beyond my skills, but I suppose it's
possible, and probably not highly recommended. A plug-in for IE might do
it.

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"SteveS" <St****@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.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?

Nov 16 '05 #3
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****@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.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?


Nov 16 '05 #4
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.com

"SteveS" <St****@discussions.microsoft.com> wrote in message
news:AD**********************************@microsof t.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****@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.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?


Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: MALdito | last post by:
hi everybody let me say right from the start .. I´m not a coder ... "just" a designer! that said .. here is my question: I´m using dreamweaver´s built in preloader for a menu. it looks like...
2
by: Neil Fedin via .NET 247 | last post by:
I am writing a testing application that uses reflection to open assemblies and call methods. I have a function that looks like this... public void Method1 (int IDArray, bool SomethingElse){...
1
by: S Shulman | last post by:
Hi I am looking for a method that allows calling a method that will be executed by the main application thread bu will be called from any thread that I create manually. (I think that...
1
by: boxim | last post by:
hi all, I'm having a few problems whereby my application is hanging when using the Invoke method of a form's control. Basically, when a user clicks a button on the form, it calls a remote...
4
by: Charles Law | last post by:
Hi guys. I have two threads: a main thread and a background thread. Lots of stuff happens in the background thread that means I have to update several (lots) of controls on a form. It is...
1
by: Lore Leunoeg | last post by:
If I call a delegates BeginInvoke a new thread from the threadpool is started. But what happens if I call the Invoke method? Does this also start a new thread? Thank you sincerely Lore
15
by: Oleg Subachev | last post by:
I need to programmatically invoke from other class Click event of the Button on my Form. Button.OnClick method is protected, not public. How to perform this ? Oleg Subachev
11
by: cindy | last post by:
I have a form, has javascript registered so a modal pops up. Button click will close form. Now I need to do an update with modal form data before it closes. I can put a second button and register...
5
by: Richard | last post by:
Hello, I'm working on an application to allow our network team to use a small application to make DHCP reservations on our Microsoft DHCP Server. The problem is you have to use P/Invoke to do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.