Questions tagged as 'javascript'

1
answer

Write in Rectangle - HTML Canvas

I'm using the following code var canvas = document.createElement("canvas"); canvas.width = 55; canvas.height = 20; var ctx = canvas.getContext("2d"); ctx.fillStyle = "red"; ctx.fillRect(0, 0, 100, 100); var img = document.createElement("img")...
asked by 29.01.2015 / 17:16
2
answers

Check closed flap

I found the following code on the internet: <script type="text/javascript"> var popup = null; function Abrir() { if (popup!=null && popup.closed) alert("A Janela foi fechada.n Abrindo novamente."); if (popup!=null &...
asked by 12.05.2015 / 00:10
1
answer

Send message to specific user in Websocket PHP

I have a real-time chat application with Websocket. But at the moment it sends messages to all users, I would like to know how do I send them to a specific user. In case, when I click on the user (from a list that appears next to it), he will st...
asked by 02.05.2015 / 05:59
2
answers

Consuming Moodle Web Service

I'm trying to consume the moodle webservice, following a js / rest example that I found in github, I created a test.php with the code below (changing the domainname and token), but when I call the page I do not receive anything in the variable r...
asked by 14.05.2015 / 18:45
1
answer

jquery.inputmask mask with values in real currency

I'm using the jquery.inputmask plugin for various mask types in the imputs of my application and even for formatting coins . I'm using the following custom rule: <script> $(function() { $("#money").inputmask('decimal',...
asked by 13.10.2016 / 20:49
2
answers

Problem with variable scope in each method

I'm having problems with assigning to a variable within an each in jQuery. (function(){ var filters = $(".filter_check:checked"); var hiddenFields = ''; $.each(filters, function(){ hiddenFields += "&" + $(this).data('p...
asked by 11.03.2015 / 15:09
2
answers

Sort by Value in DataTables

I'm using the Bootstrap SB Admin2, which makes use of the DataTables component. In my jsp page I'm loading the following table: <table class="table table-striped table-bordered table-hover" id="dataTables-example"> <thead>...
asked by 05.03.2015 / 21:33
3
answers

How to show values stored in JSON in JavaScript

It has a variable in a file JSON that is called "value" and it is assigning the values: 2.51,2.56,2,87,2,89 and 2.94. The string of this JSON is being displayed in DIV . How do I show only those values?     
asked by 16.03.2015 / 15:22
1
answer

Apply mask to dynamic fields generated after page load

I am using a mask directive in the monetary field, the job is performed on the screen theproblemiswhenIinsertanewitemng-repeatinsertsnewfieldswithoutthemask,Ireferencetheclassandusethecreateddirectiveformat="priceformat". When you click on...
asked by 26.02.2015 / 02:45
1
answer

Vertical Sidebar Menu using Bootstrap 3.3.2

My problem is to replicate something like this. I'm having a hard time solving this: link The difference is: without words. When I hover over the entire bar, the rest of the width appears telling what each page is (on the bottom what eac...
asked by 18.02.2015 / 12:45