Questions tagged as 'javascript'

2
answers

How to print a text (coupon) via javascript?

I have a commercial web application written in ASP.NET MVC4 with C #, where I need to print a direct sales closing coupon for a non-fiscal (diebold) printer. Is there a way to send JS a direct document to the printer without printing or confi...
asked by 28.10.2014 / 17:07
3
answers

Equivalent to the .filter () method of jQuery or Zepto in pure javascript

What is the best way to do the filter method like jQuery or Zepto in pure javascript? I want to implement this method in my library: link HTML <p>Lorem Ipsum</p> <p class="middle">Lorem Ipsum</p> <p class="mi...
asked by 12.02.2014 / 14:25
1
answer

JqPlot error in IE 7

I'm using the JqPlot plugin to generate a bar and column chart. After running the tests in Mozilla and Chrome, which worked perfectly, I ran the test on IE7 and IE8 and got the following error:    window.g_vmlcanvasmanage...
asked by 12.02.2014 / 18:08
2
answers

How to use fadeIn () in addClass ()?

I have 10 elements with class "hide", less the first one. When I click on a button I remove the next hide and add the class "show", but when I add it I want to put a fadeIn () effect. Is it possible?     
asked by 20.02.2014 / 15:06
1
answer

How to change the window.location of a frame

I wanted to know if you can enter a target here: window.location='www.google.com'; I do not want to open a new page, otherwise I would use window.open . I want to use target="topFrame" to control a player. I'm using an old l...
asked by 17.07.2014 / 18:33
2
answers

Object-return syntax in JavaScript

Using the Chrome console I used the following code (valid): function foo() { return { prop: "some value" }; } When changed, the syntax style is no longer valid ( { played to next line): function foo() { return...
asked by 31.07.2014 / 19:55
1
answer

What is the difference between element.push ("value") and element [element.length]

Hello. Whenever I need to add a new index in an array I use the second method, but I see some using the first one and I do not know if there is any difference between them.     
asked by 23.10.2015 / 18:33
3
answers

How do I call the next field of a table with JavaScript or Jquery?

I tried to create an empty table so that when the user clicks in the middle of the <td> field a <input type="text" /> appears to type. Follow the code: $(function () { $("td").click(function () { va...
asked by 07.12.2017 / 12:37
1
answer

Capturing actions: Scroll Down and Scroll Up

Is there any way in jQuery to capture the events of "ScrollDown" and "ScrollUp"? I tried this way: var lastScrollTop = 0; $(window).scroll(function(event){ var st = $(this).scrollTop(); if (st > lastScrollTop){ // downscroll...
asked by 13.07.2014 / 21:36
1
answer

How do I check for multiple values in a string with JavaScript?

To search only for a fixed value in a string I can use the JavaScript function indexOf() , example: var string = "Oberyn se vinga"; string.indexOf('vinga') >= 0 //retorna true ou false But how would I do to check multiple values...
asked by 05.06.2014 / 19:53