Skip to content

Tag: html

How to escape a sup tag in xpath selector

I want to extract the text content from the below HTML tag, but the <sup> tag is preventing me from getting the desired text. The text I want to extract is simply (4:6, 6:7). how can I extract this text at the same time escaping the <sup> tag. I tried this “//p/text()”, but I am only g…

JavaScript getting txt file info not working, no errors

I’m using the code bellow to store everything in a text file into a JavaScript var which than will go into a html id and it will be displayed. but the output id will show nothing in html. Can anyone help me with this please? Answer window.onload doesn’t wait for the AJAX to complete. You should pu…

Implementing JS in Django templates

I have a list of ingredients, for every ingredient, I would like to give the option to delete the current ingredient via using a popup that asks the user “are you sure they want to delete this?” If confirmed, I want that ingredient to be deleted. Currently, no matter which ingredient I choose to d…

display user name on the heading during onload

I’m making a dynamic website that need to show the user’s name in the heading. The heading should say ‘Hello, ‘, when the user enters their name into the text box and presses the button. And the name has to stay on the page even if I refresh the page. What will be the javascript functi…