Call python script by javascript in html

Discussion in 'Javascript' started by Sibou51, Feb 28, 2006.

  1. Sibou51

    Sibou51 Guest

    Hello everybody,


    do you know if it's possible to call a python script in html page??

    I want call my script pyhton and I have a html with javascript but I
    don't know how, do you have an example??


    thanks
     
    Sibou51, Feb 28, 2006
    #1
    1. Advertising

  2. Sibou51 wrote:

    > do you know if it's possible to call a python script in html page??
    >
    > I want call my script pyhton and I have a html with javascript but I
    > don't know how, do you have an example??


    Client side python? First you'd need to install an extension that adds
    support for PythonScript to the browser. I believe ActiveState produce one
    for IE.

    Server side? You'd have to issue a new HTTP request. This is usually done by
    changing the document.location of either the main document or a (shudder)
    iframe or frame. The XMLHttpRequest object is a much hyped alternative.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Feb 28, 2006
    #2
    1. Advertising

  3. Sibou51

    Jonas Raoni Guest

    Sibou51 wrote:
    > do you know if it's possible to call a python script in html page??
    >
    > I want call my script pyhton and I have a html with javascript but I
    > don't know how, do you have an example??


    You can't, you can only make requests for pages and there you can make
    what you need =b

    - (new Image).src = "url";
    - The XMLHttpRequest object
    - iframe/frames
    - etc.


    --
    Jonas Raoni Soares Silva
    http://www.jsfromhell.com
     
    Jonas Raoni, Feb 28, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wet Basement
    Replies:
    1
    Views:
    2,542
    BobMonk
    Jul 15, 2003
  2. Karim Ali
    Replies:
    1
    Views:
    284
    James Stroud
    May 24, 2007
  3. Fabio Mastria
    Replies:
    4
    Views:
    738
    Fabio Mastria
    Jan 28, 2008
  4. Blue®
    Replies:
    10
    Views:
    321
    Thomas 'PointedEars' Lahn
    May 27, 2005
  5. Replies:
    8
    Views:
    238
    andrea crotti
    Aug 16, 2012
Loading...

Share This Page