Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Connecting javascript to python  RSS feed

 
Vani Sweety
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
i have two piece of code
one i have used python to write some function
now i want to display this function on a html webpage
how can i connect python function using javascript on even click
help please
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65897
135
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not believe that you can. The python runs on the server, correct? JavaScript runs on the client.
 
Vani Sweety
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes
is there any way i can connect python function so that it display on my html page
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65897
135
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With JavaScript? You'd need to make an Ajax request.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36622
475
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your python running on a server like in LAMP? Or just a standalone program?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!