Call Javascript function from ANSI C program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paolo

    #1

    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

  • KiLVaiDeN

    #2
    Re: Call Javascript function from ANSI C program

    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

    Comment

    • Paolo

      #3
      Re: Call Javascript function from ANSI C program


      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.mozil la.org/en/docs/JavaScript_C_En gine_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

      Comment

      • SM Ryan

        #4
        Re: Call Javascript function from ANSI C program

        "Paolo" <laurentipaolo@ 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

        Comment

        • CBFalconer

          #5
          Re: Call Javascript function from ANSI C program

          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
          >authenticati on 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.mozil la.org/en/docs/JavaScript_C_En gine_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>

          Comment

          • Kenny McCormack

            #6
            Re: Call Javascript function from ANSI C program

            In article <454BA4A2.C58EB D3D@yahoo.com>,
            CBFalconer <cbfalconer@mai neline.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:





            Comment

            Working...