Javascript – DND print script in HTML5

I created an HTML script to quickly create a Dnd5 sheet. This was a project that was carried out over two weeks. I don't know what to say unless I'm learning JS, CSS and HTML. I would like to learn how to do it better.

DND5 quick sheet

This is for a quick C&P sheet, enter the details in the previous prompts and you have it on the side, Reload the page to change items. Please keep writing to me discord if you see or have any problems. (---)

Apps used --- anWriter free - Js Run - duckduckgo --- on Android
(305 (111))


Javascript – How to bind an "input" event to a function

I'm trying to bind the event of a class to a function called "onTypeHandler", but I'm not sure if it's correct or not.

In HTML I have the following code:

So far in JavaScript I have this:

const search = document.querySelector('.search');
const list = document.querySelector('.list');

function onTypeHandler(event) {
  //value of the search field.
  let val = '';
  return search;
  let filteredItems = data.items.filter(function(item) {
    //finish this, a filter returns a boolean
    return false;

  let dataCopy = {
    items: filteredItems

search.addEventListener('input', values);
function values(e) {
  list.textContent =;

Data is an object that consists of arrays of personal information.

I just want to know whether I have bound the event correctly to the search class or not and if not where my error is. It can use jQuery or simple JS doesn't matter. Thank you very much.

Javascript – Error when using the proxy and displaying the last function in the console

I have a problem with part of the code where I pass a function to the proxy and intercept the specified values

function bridge() {}
bridge.__proto__ = new Proxy(bridge, {
    get: (o, k) => o(k),
    set: (o, k, v)=> o(k)


An endless loop is created and I have everything. This is an example of what I am doing

Get Javascript ID for a list item with JS

I'm trying to set up a simple subscription tool that allows users to subscribe to or unsubscribe from different distribution lists. The idea is that you select a user via a person selection (& # 39; sub-user & # 39;), select a list (& # 39; sub-list & # 39;) and either on Subscribe (to be added to the selected list) or click on Unsubscribe (so that they will be deleted from the selected list). I successfully completed the subscription part, but got stuck when I unsubscribed. I know how to delete an article from a list, but to do that I need to have an article ID (or is there another way?). This is the part of my code that I want to use to get the ID for the item that contains a user selected through People Picker. However, the element ID is not defined:

function removeUser()     
var clientContext = new SP.ClientContext(siteurl);    
var value1 = document.getElementById('subuser').value;    
var value2 = document.querySelector('input(name="sublist"):checked').value;    
var queryLookup = ""+ value1 +"";
var itemID="";

    operation: "GetListItems",    
    async: false,    
    listName: value2,    
    CAMLViewFields: "",    
    CAMLQuery: queryLookup,    
    completefunc: function(xData,Status) {    
        itemID = $(xData.responseXML.xml).find("z\:row").attr("ows_ID");

PLC services can be replaced by any other working solution. Thank you for suggestions.

Javascript – How do I list JSON data in a div with jquery?

Friends, I have the following JSON:

"codigo": "12345",
"cerca": "Rato",
"host": "df",
"eventos": (
        "data": "21/02/2020",
        "hora": "19:38",
        "local": "Moema/SP",
        "status": "Morto",
        "subTim": (
            "Um dia sem PC"
        "data": "21/02/2020",
        "hora": "18:29",
        "local": "Tatuapé/SP",
        "status": "Meio vivo",
        "subTim": (
            "Quatro dias sem PC"
        "data": "21/02/2020",
        "hora": "18:09",
        "local": "Anápolis/GO",
        "status": "Só tonto",
        "subTim": (
            "Dois dias sem PC"

I can load some JSON data with JS into the following form:


What is the right way to list "Events" with "Data", "Status" and "SubTim" in a div named #ocorridos on the form? Example:

Occurred: my code: 12345 / environment: mouse / host: df

Event1: 02/21/2020 19:38 / Status: Dead / SubTim: A day without a PC

Event2: 02/21/2020 18:29 / Status: Half Live / SubTim: Four days without a PC

Event3: 02/21/2020 18:09 / Status: Only dizzy / SubTim: Two days without a PC

Thank you in advance for your attention

html – Add images dynamically with JavaScript

To create elements dynamically in JavaScript, simply use the createElement function by passing the name of the tag you want to create as an argument (in this case, the tag ).

After you create the image element, set the attribute src the image path and add the element you created in the div with appendChild. See the following example:

function criaImagem(){
    div = document.getElementById("imagens");
    image = document.createElement("img");
    image.src = prompt("Digite o nome ou link da imagem: ");

Javascript – useRef in a modal dialog

I am using the material user interface and am having trouble setting the label width in a modal dialog box. Here is the code:

export const MyModal = (props: MyModalProps) => {
  const inputLabel: any = useRef(null);
  const (labelWidth, setLabelWidth) = useState(0);

  useEffect(() => {
    if (inputLabel && inputLabel.current) {
  }, (props.isOpen));

  return (
      Edit event

export default MyModal;

As expected, inputLabel.current is null when the parent page is initialized. When I open the dialog, inputLabel.current is also null. If I then close the dialog, inputLabel.current will finally get the correct reference. If I open the dialog again, everything works as expected – labelWidth has the correct value.
How can I get it to work for the first time when I open the dialog?

Thank you very much

Javascript – General Q || Styling and functioning with SharePoint

I am new to Microsoft SharePoint. I was curious to see if anyone had tutorials or a great explanation of how I (as a site owner) could change a page (say the homepage for now) and add things like a header to the homepage (so every time everyone comes, you will see the content I have). So how do I write CSS or modular SCCS to get an effect on every page? It just seems a little confusing how I could do this and I don't see any way how to do it? The documentation didn't really show the first steps. Once I know where and how I can change things, the actual CSS part and what seems to be difficult. Any help would be greatly appreciated, thanks

javascript – main.min.js interrupts a function on my wite

I've been trying to fix this for a while now, but I can't get it to work: /
I am developing a WordPress site with the theme 7.
In addition, I have now installed the WCFM Marketplace (Vendor Plugin), which has a frontend store manager. But I get an error message when I'm in Store Manager (I can't click any of the buttons) – the rest of the page works fine, but on that particular page the error is shown.

Error: main.min.js? Ver = 7.8.0: 9

TypeError not captured: The property & # 39; top & # 39; cannot be read from undefined
at HTMLDocument. (main.min.js? ver = 7.8.0: 9)
at i (jquery.js? ver = 1.12.4-wp: 2)
at Object.fireWith (as resolveWith) (jquery.js? ver = 1.12.4-wp: 2)
with Function.ready (jquery.js? ver = 1.12.4-wp: 2)
at HTMLDocument.J (jquery.js? ver = 1.12.4-wp: 2)

Can someone tell me how I can fix this?
Maybe there is a way to remove this .js file from this page only?

I can't wait to hear from you 🙂

Kind regards,