Questions tagged as 'javascript'

1
answer

Convert base64 image to "input file"

Good morning, I'm making an application in angular that picks up a drawing made in canvas and then upload it as a png image to the server. This is my function: $scope.signContract = function(){ var canvas = document.getElementById("p...
asked by 10.03.2017 / 12:27
3
answers

Validate controls in ASP.NET MVC views

What is most advisable to validate controls in the views (ASP.NET MVC) controls I refer to textbox, combobox, etc. In the textbox enter letters, numbers, text sizes that I think will be done by html, which would be recommended javascript, jquery...
asked by 27.12.2016 / 03:15
1
answer

How to take the net value of a select in a JQUERY change?

I have the table país and ciudad , the city depends on the country, so I decided dynamically that when I select the country I do change taking the value , in this case the id_pais and that send a% per% code to list the...
asked by 06.03.2017 / 21:31
2
answers

JavaScript date format

I'm having problems formatting the date. As a matter of version, I can not define a date type field, so I must define it type datetime and add several 0 to the end. I get a json this: Object {fecha_desde: "2017-01-01 00:00:00.000", fech...
asked by 06.03.2017 / 20:31
3
answers

send data between components Angular 2

I'm using routerLink to send an id of a component with a list of restaurants to another component through the URL [routerLink]="['../restaurant-menu', restaurant.id]" in the other component I use it in the following way ngOnInit()...
asked by 05.12.2016 / 17:17
2
answers

Styling a pseudo element :: after with jQuery

How to select from jQuery an element of this style? .page-container .single-page:nth-of-type(2)::after { } The idea is to be able to modify certain rules CSS from JavaScript.     
asked by 26.10.2016 / 16:06
1
answer

CORS 'Access-Control-Allow-Origin' in Angularjs

I'm trying to get data from this url: link but when I show the results I get this error: Request from another blocked source: the same source policy prevents reading the remote resource at link (reason: the CORS header 'Access-Control-...
asked by 22.11.2016 / 06:19
1
answer

What is the advantage or disadvantage of doing a modal window in this way?

I have seen many plugins that allow to integrate modal windows in our webs, which contain a lot of javascript code. On the w3school page they have a modal type made with little javascript code, using GetElementById , which is part of ja...
asked by 25.11.2016 / 05:40
1
answer

Load source into a .ttf file from JavaScript

I am trying to add a source to my project, the issue is that I need to do everything from JS, how do I load a source from a .ttf file? since to apply the font-family I need the font to be already loaded (since apparently it only receives as para...
asked by 27.11.2016 / 01:17
1
answer

How to get an answer using ngResource

I have a controller with which I could ( finally ), save a record in my database, which is this: function PuestoAddController(puestosService, puesto){ var self = this; var _puesto = puesto; function _add(_puesto){ consol...
asked by 24.11.2016 / 21:02