Click here to Skip to main content
15,123,923 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Trying to read a value that is coming from html() function from Table Cell Id Pin
simpledeveloper17-Feb-21 23:47
Membersimpledeveloper17-Feb-21 23:47 
GeneralRe: Trying to read a value that is coming from html() function from Table Cell Id Pin
Richard MacCutchan18-Feb-21 0:11
mveRichard MacCutchan18-Feb-21 0:11 
GeneralRe: Trying to read a value that is coming from html() function from Table Cell Id Pin
simpledeveloper18-Feb-21 8:08
Membersimpledeveloper18-Feb-21 8:08 
GeneralRe: Trying to read a value that is coming from html() function from Table Cell Id Pin
Richard MacCutchan18-Feb-21 22:19
mveRichard MacCutchan18-Feb-21 22:19 
QuestionSending Blob (webm) from client to server. Pin
Rayj201010-Feb-21 13:38
MemberRayj201010-Feb-21 13:38 
Questionconnecting javascript or jquery with node.js backend APIs Pin
Member 141035569-Feb-21 11:25
MemberMember 141035569-Feb-21 11:25 
QuestionEdit only a part of text inserted in a "select"... Pin
Member 150649449-Feb-21 0:46
MemberMember 150649449-Feb-21 0:46 
QuestionWhy can't execute the code to the secondary window in javascript? Pin
JacksonSteel5-Feb-21 15:54
MemberJacksonSteel5-Feb-21 15:54 
let elements;
let element_text;
let artistname = 'Hans Zimmer';
let spotify_window = window.open('https://open.spotify.com/search/Hans%20Zimmer');

//I thought it's becaue the window hadn't loaded, but it didn't work
setTimeout(function () {
}, 5000);

elements = spotify_window.document.querySelectorAll('._45331a50e3963ecc26575a06f1fd5292-scss._3957b7dd066dbbba6a311b40a427c59f-scss:not(.good-one)');
alert(elements[0]);
//always undefine which is wrong

for (let element of elements) {
    element_text = element.innerText;
    if (element_text == artistname) {
        element.click();
        break;
    }

    element.classList.add('good-one');

}


the class name isn't wrong

https://ibb.co/sFTFt81



Also, if I execute the following code in that tab's console, it worked

let elements;
let element_text;
let artistname = 'Hans Zimmer';

elements = document.querySelectorAll('._45331a50e3963ecc26575a06f1fd5292-scss._3957b7dd066dbbba6a311b40a427c59f-scss:not(.good-one)');
alert(elements[0]);
//always undefine which is wrong

for (let element of elements) {
    element_text = element.innerText;
    if (element_text == artistname) {
        element.click();
        break;
    }

    element.classList.add('good-one');

}


see:

https://ibb.co/PGn9cG4

then it clicked and jumped to the page

https://ibb.co/n6CPmvy
AnswerRe: Why can't execute the code to the secondary window in javascript? Pin
Richard Deeming7-Feb-21 23:06
mveRichard Deeming7-Feb-21 23:06 
QuestionUse radiobutton and checkbox together Pin
Member 150649444-Feb-21 14:24
MemberMember 150649444-Feb-21 14:24 
AnswerRe: Use radiobutton and checkbox together Pin
Richard MacCutchan4-Feb-21 23:52
mveRichard MacCutchan4-Feb-21 23:52 
GeneralRe: Use radiobutton and checkbox together Pin
Member 150649445-Feb-21 0:57
MemberMember 150649445-Feb-21 0:57 
GeneralRe: Use radiobutton and checkbox together Pin
Richard MacCutchan5-Feb-21 0:59
mveRichard MacCutchan5-Feb-21 0:59 
GeneralRe: Use radiobutton and checkbox together Pin
Richard Deeming5-Feb-21 1:47
mveRichard Deeming5-Feb-21 1:47 
GeneralRe: Use radiobutton and checkbox together Pin
Richard MacCutchan5-Feb-21 2:01
mveRichard MacCutchan5-Feb-21 2:01 
AnswerRe: Use radiobutton and checkbox together Pin
Richard Deeming5-Feb-21 2:17
mveRichard Deeming5-Feb-21 2:17 
GeneralRe: Use radiobutton and checkbox together Pin
Member 150649445-Feb-21 2:44
MemberMember 150649445-Feb-21 2:44 
QuestionHow to use decimals (0.01) in Javascript function Pin
Member 150641013-Feb-21 19:17
MemberMember 150641013-Feb-21 19:17 
AnswerRe: How to use decimals (0.01) in Javascript function Pin
Richard MacCutchan3-Feb-21 23:54
mveRichard MacCutchan3-Feb-21 23:54 
GeneralRe: How to use decimals (0.01) in Javascript function Pin
mikehunterr5-Feb-21 2:08
professionalmikehunterr5-Feb-21 2:08 
GeneralRe: How to use decimals (0.01) in Javascript function Pin
Richard MacCutchan5-Feb-21 2:09
mveRichard MacCutchan5-Feb-21 2:09 
GeneralRe: How to use decimals (0.01) in Javascript function Pin
mikehunterr5-Feb-21 2:19
professionalmikehunterr5-Feb-21 2:19 
QuestionAssignment Help Pin
Member 150639523-Feb-21 14:12
MemberMember 150639523-Feb-21 14:12 
AnswerRe: Urgent Java Assignment Help Pin
Richard Deeming3-Feb-21 22:45
mveRichard Deeming3-Feb-21 22:45 
Questionhow can i unmute a video using js for chrome Pin
Member 148717433-Feb-21 0:28
MemberMember 148717433-Feb-21 0:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.