Click here to Skip to main content
15,902,447 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionToggling two Radio buttons depending upon enum values in Angular 2.0 Pin
simpledeveloper27-Feb-19 13:38
simpledeveloper27-Feb-19 13:38 
QuestionAJAX,how to get more values from $.ajax({}) function in a Zend Controller Pin
serenimus25-Feb-19 8:49
serenimus25-Feb-19 8:49 
QuestionHow to identify if string is a phone number, Email address or a web address in Javascript? Pin
Member 1397526717-Feb-19 14:51
Member 1397526717-Feb-19 14:51 
SuggestionRe: How to identify if string is a phone number, Email address or a web address in Javascript? Pin
Richard MacCutchan17-Feb-19 22:05
mveRichard MacCutchan17-Feb-19 22:05 
AnswerRe: How to identify if string is a phone number, Email address or a web address in Javascript? Pin
Blikkies27-Feb-19 2:28
professionalBlikkies27-Feb-19 2:28 
QuestionAssignment help? Pin
Member 141452369-Feb-19 12:49
Member 141452369-Feb-19 12:49 
AnswerRe: Assignment help? Pin
Richard MacCutchan9-Feb-19 22:51
mveRichard MacCutchan9-Feb-19 22:51 
AnswerRe: Assignment help? Pin
ZurdoDev27-Feb-19 3:50
professionalZurdoDev27-Feb-19 3:50 
QuestionJavaScript Environment Pin
Member 141438347-Feb-19 21:44
Member 141438347-Feb-19 21:44 
AnswerRe: JavaScript Environment Pin
Richard MacCutchan7-Feb-19 22:31
mveRichard MacCutchan7-Feb-19 22:31 
QuestionJavaScript in Microsoft Visual Studio Pin
Member 141438347-Feb-19 21:43
Member 141438347-Feb-19 21:43 
AnswerRe: JavaScript in Microsoft Visual Studio Pin
Richard MacCutchan7-Feb-19 22:29
mveRichard MacCutchan7-Feb-19 22:29 
QuestionSimple Modal Dialog Pin
Bram van Kampen31-Jan-19 11:58
Bram van Kampen31-Jan-19 11:58 
AnswerRe: Simple Modal Dialog Pin
Richard Deeming8-Feb-19 1:09
mveRichard Deeming8-Feb-19 1:09 
QuestionCalling Web api from Angular Service and Component Pin
simpledeveloper29-Jan-19 7:07
simpledeveloper29-Jan-19 7:07 
QuestionFor loop query Pin
Member 1413327128-Jan-19 22:54
Member 1413327128-Jan-19 22:54 
QuestionRe: For loop query Pin
Richard MacCutchan28-Jan-19 23:35
mveRichard MacCutchan28-Jan-19 23:35 
AnswerRe: For loop query Pin
ZurdoDev30-Jan-19 2:08
professionalZurdoDev30-Jan-19 2:08 
AnswerRe: For loop query Pin
Suresh Madhavaraju11-Feb-19 3:20
Suresh Madhavaraju11-Feb-19 3:20 
AnswerRe: For loop query Pin
W Balboos, GHB7-Mar-19 7:18
W Balboos, GHB7-Mar-19 7:18 
QuestionDebugging Pin
Bram van Kampen26-Jan-19 14:14
Bram van Kampen26-Jan-19 14:14 
AnswerRe: Debugging Pin
Richard Deeming28-Jan-19 1:01
mveRichard Deeming28-Jan-19 1:01 
GeneralRe: Debugging Pin
Bram van Kampen28-Jan-19 11:21
Bram van Kampen28-Jan-19 11:21 
QuestionCan anyone help me understand this code? Pin
Member 1411814323-Jan-19 1:20
Member 1411814323-Jan-19 1:20 
AnswerRe: Can anyone help me understand this code? Pin
Richard Deeming23-Jan-19 7:35
mveRichard Deeming23-Jan-19 7:35 
Member 14118143 wrote:
I don't understand why the button are put at class "tablinks" when such a class does not exist in the entire css.

Because that class is being used to target the elements from the Javascript:
JavaScript
tablinks = document.getElementsByClassName("tablinks");

Document.getElementsByClassName() | MDN[^]

Member 14118143 wrote:
I would also like to know how this code would work if I used a <href> links here instead of buttons. How would that make my code different?

The only difference would be that you would need to call evt.preventDefault() in your openCity method to prevent the browser from navigating to the href.
Event.preventDefault() | MDN[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

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.