By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 947 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

Call Javascript function from ANSI C program

P: n/a
Hi to everybody,
i have this problem.
I need to refresh an input text field inside a form on a PHP web page
with a value notfied by a software written in ANSI C language.
I don't want that my C software make HTTP POST operation using CURL on
my PHP web page because i don't want refresh all the page but only the
single input field.
How can I do that?
Does exists a C library that provides some features that can help me?

Thank a lot
Paolo

Nov 3 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Paolo wrote:
>
Hi to everybody,
i have this problem.
I need to refresh an input text field inside a form on a PHP web page
with a value notfied by a software written in ANSI C language.
I don't want that my C software make HTTP POST operation using CURL on
my PHP web page because i don't want refresh all the page but only the
single input field.
How can I do that?
Does exists a C library that provides some features that can help me?

Thank a lot
Paolo
Hello,

There is no standard way of doing this, because Javascript engines are
mostly browser-dependant, and the rendering engine is not accessible
unless hooking the program in memory, and I'd totally advice you not to
go on such a difficult path, because it could lead to problems and
corruption.

I think you should propose your users a simple copy and paste of the
value, or as you suggested, do a post with curl, on a page, and then
retrieving it through AJAX, But you'll be faced to a session
authentication problem, unless that value is general for all your
users.

Cheers
K

Nov 3 '06 #2

P: n/a

KiLVaiDeN wrote:
Paolo wrote:

Hi to everybody,
i have this problem.
I need to refresh an input text field inside a form on a PHP web page
with a value notfied by a software written in ANSI C language.
I don't want that my C software make HTTP POST operation using CURL on
my PHP web page because i don't want refresh all the page but only the
single input field.
How can I do that?
Does exists a C library that provides some features that can help me?

Thank a lot
Paolo

Hello,

There is no standard way of doing this, because Javascript engines are
mostly browser-dependant, and the rendering engine is not accessible
unless hooking the program in memory, and I'd totally advice you not to
go on such a difficult path, because it could lead to problems and
corruption.
Ok, I understand.
I think you should propose your users a simple copy and paste of the
value, or as you suggested, do a post with curl, on a page, and then
retrieving it through AJAX, But you'll be faced to a session
authentication problem, unless that value is general for all your
users.
Ok, but with this way I don't solve my problem because I have to use a
web page that must be entirily refreshed by my application.
With Google I found this:

http://developer.mozilla.org/en/docs/JavaScript_C_Engine_Embedder's_Guide

Do you know it? Can it solve my problem? I not have time yet to read
the guide....
Cheers
K
Thanks a lot
Paolo

Nov 3 '06 #3

P: n/a
"Paolo" <la***********@gmail.comwrote:
# Hi to everybody,
# i have this problem.
# I need to refresh an input text field inside a form on a PHP web page
# with a value notfied by a software written in ANSI C language.
# I don't want that my C software make HTTP POST operation using CURL on
# my PHP web page because i don't want refresh all the page but only the
# single input field.
# How can I do that?
# Does exists a C library that provides some features that can help me?

It's not a C issue, as such. You can google 'remote scripting'
for more information.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
If you plan to shoplift, let us know.
Thanks
Nov 3 '06 #4

P: n/a
Paolo wrote:
KiLVaiDeN wrote:
>>Paolo wrote:

I need to refresh an input text field inside a form on a PHP web
page with a value notfied by a software written in ANSI C language.
I don't want that my C software make HTTP POST operation using CURL
on my PHP web page because i don't want refresh all the page but
only the single input field.
How can I do that?
Does exists a C library that provides some features that can help me?

There is no standard way of doing this, because Javascript engines are
mostly browser-dependant, and the rendering engine is not accessible
unless hooking the program in memory, and I'd totally advice you not to
go on such a difficult path, because it could lead to problems and
corruption.

Ok, I understand.
>I think you should propose your users a simple copy and paste of the
value, or as you suggested, do a post with curl, on a page, and then
retrieving it through AJAX, But you'll be faced to a session
authentication problem, unless that value is general for all your
users.

Ok, but with this way I don't solve my problem because I have to use a
web page that must be entirily refreshed by my application.
With Google I found this:

http://developer.mozilla.org/en/docs/JavaScript_C_Engine_Embedder's_Guide

Do you know it? Can it solve my problem? I not have time yet to read
the guide....
This is an example of why you should not attempt answers to
off-topic questions, other than to redirect the OP to a suitable
newsgroup. He has just continued the off-topic post, rather than
going somewhere suitable. We don't need the additional clutter.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

Nov 4 '06 #5

P: n/a
In article <45***************@yahoo.com>,
CBFalconer <cb********@maineline.netwrote:
....
>This is an example of why you should not attempt answers to
off-topic questions, other than to redirect the OP to a suitable
newsgroup. He has just continued the off-topic post, rather than
going somewhere suitable. We don't need the additional clutter.
IOW:

Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

Useful clc-related links:

http://en.wikipedia.org/wiki/Aspergers
http://en.wikipedia.org/wiki/Clique
http://en.wikipedia.org/wiki/C_programming_language

Nov 4 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.