omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Javascript emmbeded in HTML python server

    Pythonista
    2
    3
    2301
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dormane
      Dormane last edited by

      Ok, this is a fairly dumb question, and I am new to webpage development, but it is easy enough to use HTML with Bottle, such as in...

      from bottle import route, run
      @route('/hello')
      def hello():
      return """<P>Hello World!</P>""" #Not an entire HTML form, but still valid 
      
      run(host='localhost', port=8080, debug=True)
      

      But will embedding the javascript into the HTML actually work? I don't think its a completely foolish question as javascript is interpreted along with the HTML by the browser.

      1 Reply Last reply Reply Quote 0
      • TheWizza
        TheWizza last edited by

        @Dormane I think you should be fine. I'm new to Python, but I've got 17 years of web development under my belt. If the script translates the way I think it does, you shouldn't have any difficulties adding JavaScript into your HTML document.

        1 Reply Last reply Reply Quote 0
        • Dormane
          Dormane last edited by

          thanks

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors