Question on Integrating Python with HTML

Reply

Join Date: Apr 2008
Posts: 10
Reputation: SUBHABRATAIISC is an unknown quantity at this point 
Solved Threads: 0
SUBHABRATAIISC SUBHABRATAIISC is offline Offline
Newbie Poster

Question on Integrating Python with HTML

 
0
  #1
May 15th, 2008
If I write a code like:
def addstring(n):
a1=raw_input("PRINT THE FIRST STRING:")
a2=raw_input("PRINT THE SECOND STRING:")
a3=" "
a4=a1+a3+a2
print "THE TWO STRINGS YOU PRINTED ARE ADDED AS"
print a4

Now, if I design one HTML form where strings can be submitted but if I put one ADD button how would I integrate with addstring function?
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,597
Reputation: Lardmeister is an unknown quantity at this point 
Solved Threads: 28
Lardmeister's Avatar
Lardmeister Lardmeister is offline Offline
Posting Virtuoso

Re: Question on Integrating Python with HTML

 
0
  #2
May 15th, 2008
You can use Python as a scripting language for HTML code similar to javascript, but the server has to allow it.
I upped my sanitary measures, up yours!
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 10
Reputation: SUBHABRATAIISC is an unknown quantity at this point 
Solved Threads: 0
SUBHABRATAIISC SUBHABRATAIISC is offline Offline
Newbie Poster

Re: Question on Integrating Python with HTML

 
0
  #3
May 16th, 2008
Yes, thanx for your suggestion I was thinking to use HTML Parser or VBScript and then transform into Python.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum


Views: 433 | Replies: 2
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC