DynamicForm + javascript

Javascript
I have some dynamic forms working in Yii2 and it works fine for me, but I need to add a little function to get cost price and sale price. It is work i...
1 year ago

Javascript Closure vs Javascript OO

Javascript
I was reading Closures and it has the example of the following closure. var makeCounter = function() { var privateCounter = 0; function changeBy(va...
2 years ago

DOM access through javascript - Javascript

HTML
I am accessing a children of a DIV element on Facebook post which I am going to use on my chrome extension. I am trying to get the innerText of that e...
9 months ago

How to run a function in jQuery for 15 times

Javascript
I have a jQuery function setInterval(function () { secondPlay() }, 1000); setInterval(function () { secondPlay1() }, 1...
2 years ago

Phone mask with jQuery and Masked Input Plugin

Javascript
I have a problem masking a phone input with jQuery and Masked Input Plugin. There are 2 possible formats: (XX)XXXX-XXXX (XX)XXXXX-XXXX Is there...
2 years ago

Update value by using DataTables row-reorder in ASP.Net MVC 5

Javascript
I need to update the OrderIndex value inside database by row-reorder function in datatables (www.datatables.net). I have already searched in google a...
2 years ago

jQuery Radio Button onChange Not Working

Javascript
I followed this example to capture an onChange() jQuery event for a radio button group: JQuery $(#radioButton).change(...) not firing during de-select...
2 years ago

Is it possible to "freeze" a Set (or Map)?

Javascript
while Set is an Object, Object.freeze() works on the object's properties, which evidently Map and Set do not use: eg let m = new Map(); Object.freez...
2 years ago

jquery - datatable change sScrollY

Javascript
I would like to change size of scrollable area of a datatable. $('#example').dataTable({"sScrollY": 100}); //some stuff.. $('#example').dataTable({"s...
2 years ago

Show datat-content when hover on glyphicon glyphicon-info-sign

Javascript
I am showing some information when mouse hovering on glyphicon sign. The code is working now but only for add content. I want to uses the same JQuery ...
2 years ago

How to set title of x-axis and y-axis name for amChart?

Javascript
In amChart how can I set a custom name (string) for the X axis and Y axis titles of a chart? (Horizontal Axis and Vertical Axis) var chart = AmChart...
2 years ago

Change textarea to tinyMCE Editor on button click

Javascript
I want to convert normal textarea to tinyMCE Editor on click of a button. The scenario is that i have two buttons on my page and two textareafrom one ...
2 years ago

Javascript: how to load dropdown options based on radio selection

Javascript
I'm creating a simple form that allows users to enter a frequency of a certain report. They would previously allow users to enter days of the week. As...
2 years ago

Converting relative paths to absolute with JavaScript

Javascript
HTML: <a href="/">1</a> // link to http://site.com <a href="/section/page/">2/a> // link to http://site.com/section/page/ <a ...
2 years ago

AngularJS ng-bind-html does not appear to be updating the DOM

Javascript
This is a basic example of what is happening. The HTML binding actually works just fine. I can even alert on $scope.testDocument and get my newly upda...
2 years ago

Raspberry Pi PHP GPIO read

Javascript
I've got this script to check the GPIO pin status: <script type="text/javascript"> $(document).ready(function () { // This is the ...
2 years ago

What is the best way to add options to a select from an array with jQuery?

Javascript
What is the best method for adding options to a select from a JSON object using jQuery? I'm looking for something that I don't need a plugin to do, b...
2 years ago

View data by id in laravel with ajax

Javascript
I was make create update and delete, but i get error to view data by ID. please help me : this is my script.js function dataModal(){ var tableDat...
2 years ago

Detecting an undefined object property

Javascript
What's the best way of checking if an object property in JavaScript is undefined? ...
2 years ago

Reorder DIV's based on element attributes

Javascript
I'm not sure how to go about doing this. Let's say I have the following HTML code: <div id="container"> <div class="item" order="5">&lt...
2 years ago