Click here to Skip to main content
15,887,430 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: According to you, the output of the console output will look like? Pin
Afzaal Ahmad Zeeshan17-May-17 21:48
professionalAfzaal Ahmad Zeeshan17-May-17 21:48 
GeneralRe: According to you, the output of the console output will look like? Pin
Member 1320782917-May-17 22:09
Member 1320782917-May-17 22:09 
QuestionHow can I write this button Pin
庭喵15-May-17 22:54
庭喵15-May-17 22:54 
QuestionWhen someone enters a wrong answer in an input text box in JavaScript I want the user to be placed in the same field instead of going to the next Pin
Member 1319885813-May-17 20:22
Member 1319885813-May-17 20:22 
AnswerRe: When someone enters a wrong answer in an input text box in JavaScript I want the user to be placed in the same field instead of going to the next Pin
Richard Deeming15-May-17 8:08
mveRichard Deeming15-May-17 8:08 
QuestionJSON not working in IE 6 Pin
AntoVasanth10-May-17 22:56
AntoVasanth10-May-17 22:56 
AnswerRe: JSON not working in IE 6 Pin
Richard Deeming11-May-17 1:24
mveRichard Deeming11-May-17 1:24 
QuestionJSON retrieved from server works mostly like string, not element Pin
Member 1103130410-May-17 20:36
Member 1103130410-May-17 20:36 
hy, I have typescript2 application. I use routing, su there are several separated components. Now here is a certain component where I retrieve JSON with html in it, render and it looks good. Now the problem is that there are some links it that JSON which renders but don`t work. I expected links to be working as fine as it works if you just staticaly add it to the template. Links should call functions that are in the same component which retrieves json from server.

I tried lots of examples on internet. But the result is errors or just rendering but nothing more.

There is only way I found to work is that when do this :

This component is in RouterModule.forRoot

JavaScript
@Directive({ selector: 'someevent' }) //this should match with <button someevent></button> in server table
        
export class LibraryComponent implements OnInit,AfterViewInit {


    @HostListener('click') button_pressed() {
        this.getPeriods(); //gets json from server

    }


but the problem is that it works when I press everywhere on page. Not surprising, because IMO directive is decorated to the whole component in this case, not the exact element.

Then I tried to create separated class with directive as it should be, and I added ContentChild decorator because I need to get function (getPeriods()) as it is now in diferent component, but this doesn`t call function too, though no error found.

Can you help me in any ways?

modified 11-May-17 2:46am.

Questioncss class not working Pin
Member 110313047-May-17 21:45
Member 110313047-May-17 21:45 
AnswerRe: css class not working Pin
Afzaal Ahmad Zeeshan7-May-17 23:20
professionalAfzaal Ahmad Zeeshan7-May-17 23:20 
Questionhow to call the same component more than one time Pin
Member 110313046-May-17 10:55
Member 110313046-May-17 10:55 
QuestionJquery touchend touchcancel doesn't fire Pin
jkirkerx21-Apr-17 6:55
professionaljkirkerx21-Apr-17 6:55 
AnswerHad the wrong viewport setting in zoomEnable, but I don't understand why I can't stop touchend from firing after touchstart Pin
jkirkerx21-Apr-17 7:44
professionaljkirkerx21-Apr-17 7:44 
AnswerI don't get it Pin
jkirkerx21-Apr-17 11:44
professionaljkirkerx21-Apr-17 11:44 
AnswerRe: Jquery touchend touchcancel doesn't fire [got it now] Pin
jkirkerx27-Apr-17 10:30
professionaljkirkerx27-Apr-17 10:30 
QuestionHow do I ensure that checkbox is validated FIRST before showprogress? Pin
samflex20-Apr-17 9:23
samflex20-Apr-17 9:23 
AnswerRe: How do I ensure that checkbox is validated FIRST before showprogress? Pin
Richard Deeming24-Apr-17 9:21
mveRichard Deeming24-Apr-17 9:21 
GeneralRe: How do I ensure that checkbox is validated FIRST before showprogress? (SOLVED) Pin
samflex2-May-17 8:40
samflex2-May-17 8:40 
QuestionCapture the browser close event from the close button on top left corner Pin
Zeyad Jalil15-Apr-17 1:35
professionalZeyad Jalil15-Apr-17 1:35 
AnswerRe: Capture the browser close event from the close button on top left corner Pin
Afzaal Ahmad Zeeshan15-Apr-17 3:01
professionalAfzaal Ahmad Zeeshan15-Apr-17 3:01 
AnswerRe: Capture the browser close event from the close button on top left corner Pin
F-ES Sitecore18-Apr-17 1:10
professionalF-ES Sitecore18-Apr-17 1:10 
GeneralRe: Capture the browser close event from the close button on top left corner Pin
ZurdoDev18-Apr-17 2:04
professionalZurdoDev18-Apr-17 2:04 
GeneralRe: Capture the browser close event from the close button on top left corner Pin
F-ES Sitecore18-Apr-17 2:38
professionalF-ES Sitecore18-Apr-17 2:38 
GeneralRe: Capture the browser close event from the close button on top left corner Pin
ZurdoDev18-Apr-17 3:03
professionalZurdoDev18-Apr-17 3:03 
QuestionHow to get Dynamic XFA form data using javascript Pin
abc123aaaa12-Apr-17 20:55
abc123aaaa12-Apr-17 20:55 

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.