Skip to main content

All Questions

-1 votes
2 answers
38 views

How can I select HTML elements which are rendered after DOM

I want to select OKBTN let main = document.querySelector("#main"); let okBtn = document.querySelector("#ok"); function myAlert(title,msg,icon){ let card = ""; ...
Pawan Lal Rathore's user avatar
0 votes
1 answer
28 views

How do I make a toggle Panel not be open by default? the toggle is made on JavaScript within the HTML

So I've got a page in which the user can find a "?" toggle to read information on how to use the page. However, whenever the page loads (or reloads/refreshes) the toggle panel opens up (as ...
Ren's user avatar
  • 1
0 votes
1 answer
28 views

Finding closest input in same cell multiple spans

I am having a hard time getting the closest input to the button clicked. Everything is on the same table cell. The button is inside a span and the input is inside 3 level span? Please see for ...
joanb's user avatar
  • 317
0 votes
1 answer
35 views

Making a variable element from existing element / querySelector doesn't accept Variables

Im trying to select a child div from an array with the variable x This is only a sketch to illustrate what I'm trying to do: var x= 0; trackN = document.querySelector( .track :nth-child(x)) But ...
Dr_ Buhu's user avatar
0 votes
0 answers
85 views

app.js:55 Uncaught TypeError: Cannot read properties of undefined (reading 'value')

i have checked the node list before adding the 'fetchValues' function to make sure that it have a value , but when i add the function , this error shows up: Uncaught TypeError: Cannot read properties ...
Abdi Med Amin's user avatar
0 votes
1 answer
60 views

Why does MutationObserver not detect nodes after a random point?

I am building a Tampermonkey user script. My actual script is a lot more complex but I am able to reproduce with the following example. My script needs to work on Hacker News website. For example on ...
sudoExclamationExclamation's user avatar
0 votes
0 answers
19 views

tinymce setContent and setMode Operation

I'm Having a Problem with tinymce, Editor textarea is located under a div object, tinymce.get("#DV_Gorev_Genel_Liste #TXA_GorevTanimlamaPencereAlani_Genel_Aciklama").setContent(''); tinymce....
Halil İbrahim AYHAN's user avatar
0 votes
1 answer
33 views

In Javascript, how can I querySelector to get the innerHTML excluding one of the inner sibling divs

I have the following html: <body> <span class="comment"> EXAMPLES: <p><i>Example 1</i> - <a href="https://example.com/1">...
sudoExclamationExclamation's user avatar
0 votes
0 answers
81 views

How can I press Tab key and Enter key on browser using browser's console?

I want to press 2 buttons on the website one by one (by console code) but the click code doesn't work on one of them. So instead, I am trying to make console code that presses Tab key and Enter key ...
Robert's user avatar
  • 1
0 votes
0 answers
33 views

"OR" in var selector

I've trying to customise a script that normally triggers a GTM tag to populate a form's hidden field with a variable (session_url_campaign). Here is the script: <script> (function () { var value ...
Xavier Wallach's user avatar
0 votes
0 answers
34 views

I would like to change the execution order of my event listeners but they are interdependent [duplicate]

I am new to javascript and html coding. I am writing an html form with a javascript code in it which allows the user to add a list of venues and write information about them. When a venue is added by ...
Clara's user avatar
  • 13
1 vote
2 answers
48 views

Contains to return multiple values

I am using $('label:contains('something'); to get the label that contains 'something' in it it works perfectly fine but I want to be able to handle more than one label how to do it example: HTML: <...
Amado's user avatar
  • 383
1 vote
1 answer
36 views

How can I select a DOM element, which name is changing [duplicate]

I have this DOM elelement, where the part of the name of the menu [ v15rco8kc2 ] is changing for every call of the document. How Could I use a joker in the QuerySelector? document.querySelector("#...
Walter Schrabmair's user avatar
0 votes
0 answers
38 views

Can't get value from child element using JQuery [duplicate]

I am trying to get the value of the third <p> element by referring to the id of its parent (id="pickup-searchbox"), but first I'm referring to the class of the first chid (class="...
Nikolay Kholin's user avatar
-1 votes
2 answers
115 views

Iterate Form with queryselectorall to put input value into array

I Have an html page and function is JS I noticed that myForms is a NodeList with two elements, form is 0 or 1, How do I retrieve the input values for each form? I also tried with var query = '' + ...
DevMD's user avatar
  • 29

15 30 50 per page
1
2 3 4 5
212