Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flask, read H5 text value
#1
I'm writing a Flask grocery list app.

How would I get the text value of H5 tag? So I can delete or modify it?

Screenshot: Screenshot from Raspberry Pi

So I'm making each item in the list a H5 HTML tag, but let's say I want to access 'banana 2 set', how do I do that?

{% for item in items %}
     <h5 align="center"> {{ items[1] }} </h5>
{% endfor %}
Reply
#2
I assume I also have to do some javascript such as may be mouse hover so when I move the mouse over the item in the list, it'll select that?

All the online examples I've seen with Flask are using forms, but I didn't see any examples with H1-5 tags, list etc.
Reply
#3
Anyone?
Reply
#4
I haven't used flask in a while, so can only post sites related to your question, this is not a recommendation, but hopefully useful:
https://9to5answer.com/getting-value-fro...sing-flask
Reply
#5
Thank you, all the ones I could find, and including the one you posted are using a form. I don't have a form.
I guess I'll have to use the form tag.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Flask read real time print from subprocess without deadlock vofka32 0 4,016 Jun-02-2021, 09:36 AM
Last Post: vofka32
  Flask app cannot read js and css files. Aggam 0 1,600 Nov-04-2020, 12:33 PM
Last Post: Aggam
  Read owl file using python flask Gayathri 1 2,395 Nov-20-2019, 12:56 PM
Last Post: ChislaineWijdeven
  Read Save RadioButtons from Database in Python Flask Webpage Gary8877 0 7,113 Apr-11-2019, 12:33 AM
Last Post: Gary8877
  [Flask] flask not submitting text entry when mixed with checkbox entries Prince_Bhatia 4 8,450 Oct-12-2018, 05:40 PM
Last Post: snippsat
  read text file using python and display its output to html using django amit 0 18,262 Jul-23-2017, 06:14 AM
Last Post: amit

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020