473,385 Members | 2,180 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,385 software developers and data experts.

Call Javascript function from ANSI C program

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
5 1946
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

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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: chirs | last post by:
I am trying to understand a piece of code. In a javascrpit file, there is a function: function ItemStyle(){ var names=; addProps(this,arguments,names,true); }; In the html file, it calls...
39
by: Randell D. | last post by:
Folks, I'm sure this can be done legally, and not thru tricks of the trade - I hope someone can help. I'm writing a 'tool' (a function) which can be used generically in any of my projects. ...
25
by: Java Böy | last post by:
could some body help me what's happening here... thanks.. char sc = "\x31\xc0" /* xor %eax, %eax */ "\x50" /* push %eax */...
5
by: Seong-Kook Shin | last post by:
Hi, I'm reading Steve's "C Programming FAQs" in book version, and have two question regarding to Q11.16 ... Also, a `return' from `main' cannot be expected to work if data local to main might be...
8
by: Berhack | last post by:
I am not too familiar with C# interop so please help me out. I need to call the following C function (in a DLL): // this creates an array of strings // LPTSTR is just char * void C_Func(LPTSTR...
5
by: Kurt Van Campenhout | last post by:
Hi, I am trying to get/set Terminal server information in the active directory on a windows 2000 domain. Since the ADSI calls for TS don't work until W2K3, I need to do it myself. I'm fairly...
1
by: vocalise | last post by:
The title probably isn't very clear, but I haven't been able to find this problem (or I must be having problems figuring out which search strings to use) so I apologize if this has been addressed...
11
by: Felix Kater | last post by:
Hi, I can compile and run this code (see below) which twice calls the function f, first with too less, second with too much arguments. But is it legal and free of memory leaks and other...
9
by: Allen | last post by:
The arguments of function is variable. Given function address, argument type and data, how to dynamically call the function? The following is pseudo code. int count = 0; int offset = 0; char...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.