Questions tagged as 'javascript'

1
answer

How to only allow numbers at a prompt in javascript?

I want to be able to put only numbers when I insert something into the prompt. var count = prompt("Teste"); How can I do this?     
asked by 09.07.2018 / 07:58
1
answer

Print HTML page content

I would like to print a page of this format ButwhenIgotoprintitisinthisformat IhaveafunctioninJS,butIdonotknowhowtosolvethisformattingproblemCODE<!DOCTYPEhtml><htmllang="en"> <head> <meta charset="utf-8"> <meta...
asked by 26.05.2017 / 14:29
1
answer

Concept of Angular

Well, I started studying Angular (2 and 4) and I was a bit lost in a few moments, the component much quoted as something essential confused me a lot. After all what is the concept or what is a component?     
asked by 16.05.2017 / 04:21
1
answer

Loop in json that returns all records

I am developing a system, I am doing a search with ajax and it returns a json with the bank records, but I could not elaborate a loop in PHP so json would be able to return all records. Here is my code: display.php <div class="for...
asked by 29.05.2017 / 22:24
2
answers

How to avoid repetition of code that does the same thing for different IDs?

There is an onClick Javascript function for each "Show More". This function changes the visibility of the div to visible to which the default is hidden. However, as simple as it may be, the code got too big. Is there any way to shorten or s...
asked by 09.06.2017 / 14:52
2
answers

Is it possible to use ng-model with contenteditable?

I need to use a div with the contenteditable attribute and the result of that precise value put in a ng-model . I did so, but it does not seem to be working as expected: <div contenteditable ng-model="observacao"></di...
asked by 28.12.2017 / 15:44
2
answers

Find values in an object

I'm trying to access properties of an object, a dictionary. However the references are in {String} format and their concatenation through dot (. ) and I'm using split() to break this {String} into an array ... make me use...
asked by 14.01.2018 / 03:03
1
answer

preventDefault does not work

At the following form : <form id="form_id" method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" autocomplete="off" onsubmit="valida_form()"> I have a function that checks for blanks: function valid...
asked by 19.07.2017 / 17:48
2
answers

Javascript has a xor operator?

There is an xor operator in javascript and what would be the 'symbolic' form of it (eg or has || and and tem & &)?     
asked by 23.07.2017 / 18:02
2
answers

CRUD with images, working with HttpPostedFileBase and byte []

We are using the EntityFramework with CodeFirst and DataBase PostgreSQL. There are some tables that should save images, and POCO classes are referenced as byte array. Up to this point everything is quiet. I can get the images with HttpPostedF...
asked by 25.08.2017 / 05:17