JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and  in almost every mainstream web browser.

Share tech news, updates, or what's on your mind.

Sign up to Post

Disable client-side caching in all browser. We are using Angualrjs.
For disabling the cache, I used HTML meta tags:-
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="EXPIRES" content="0">
    <meta http-equiv="PRAGMA" content="NO-CACHE">
but need a best solution
The Ultimate Tool Kit for Technolgy Solution Provi
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Can any help with an example how to add a right click JS function to a Here Maps JS control.

I need to call a function on right click that populates the items of a context menu and then displays the context menu. I cant find any examples how to get a context menu working in the here maps api

I am populating a highchart data via JS, the data is coming from a textbox on the page, this content is dynamically replaced:

            function myFunction() {
                var myvar = document.getElementById("TextBox1").value;

                Highcharts.chart('piechart2', {
                    chart: {
                        plotBackgroundColor: null,
                        plotBorderWidth: null,
                        plotShadow: false,
                        type: 'pie'
                    credits: {
                        enabled: false
                    title: {
                        text: 'Data, 2018'
                    tooltip: {
                        pointFormat: '{}: <b>{point.percentage:.1f}%</b>'
                    plotOptions: {
                        pie: {
                            allowPointSelect: true,
                            cursor: 'pointer',
                            dataLabels: {
                                enabled: true,
                                format: '<b>{}</b>: {point.percentage:.1f} %',
                                style: {
                                    color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'

Open in new window

Hi Experts,

In NetBeans, is there a way to use Multi-Language characters in your code? I guess, unicode?

var office_ta = 'அலுவலகம்';

Open in new window

When I paste the Tamil, i just get squares.

I've been tinkering with React JS for the past several months now, and just have some questions.  I'm not looking for code .. just information and maybe some links.  Please advise.

1) I'm a bit confused about how security is maintained in React based applications.  I understand that the JS and CSS files get minified and bundled during the build process.  But what about the API keys and login credentials that are buried in the JS files in the site root when deployed?  Can't anyone just view source and extract that info, ... however obfuscated it might be?  I've always wondered why the tutorial videos I've watched never get in to any of  that.  What is it that I'm missing or not understanding?  

2) Why would I ever need or want to use Redux in my React based application?  My understanding is that it would facilitate something like "multiple undo levels" .. or work similar to a web browser's "back" and "next" buttons.  Am I correct in assuming that it's mostly used for debugging / troubleshooting purposes? If not, then what's an example of real life use case scenario?

3) Regarding the new Context API .. is it being regarded as an all-out replacement for Redux?  Or are the two fundamentally different?  If so, how?

4) What other real-time databases are available besides Firebase that work with React, if any?  I'd be most interested in 3rd-party hosted solutions (like Firebase), as opposed to database engines that you'd have to install and configure on your own server.…
How do i prevent double click on checkbox ?'change', actProp);

Open in new window

i have a few of these to trigger functions but how do i prevent double click.  one works but it means i cant reuse that checkbox until i refresh .

any tips
I have some Javascript that takes the url passed to the page from a form and extracts the parameters and creates an iframe with the src based on these parameters.

The script works fine in Chrome, safari and Firefox but not Internet Explorer (v10 or v11).

I have read that IE doesn't work with searchParams but despite spending several hours searching, I can't find a working alternative or even a clue to help me investigate.

The code I have is

//var url_string = window.location.href; For this example lets use a hardcoded url
var url_string = "http://mydomain.tld?arrival=05%2F09%2F2018&numberOfNights=1&numberOfPersons=1&request_local=en";
var url = new URL(url_string);
var request_locale = url.searchParams.get("request_local");
var arrival = url.searchParams.get("arrival");
var numberOfPersons = url.searchParams.get("numberOfPersons");
var numberOfNights = url.searchParams.get("numberOfNights");

var iframe = document.createElement('iframe');
iframe.setAttribute('id', 'booking-engine');
iframe.setAttribute('frameborder', '0');
iframe.setAttribute('class', 'c-iframe c-iframe--booking');
iframe.setAttribute('style', "height: 1250px;");

if(!arrival) {
iframe.setAttribute("src", "");
else {

Open in new window


We have the following Javascript code that is used on our intranet to hide/show side menus.

This code has been working perfectly fine for the last year or so and was written by someone who no longer works for the company. However over the past couple of days the side menus have stopped working in Google Chrome on all computers.

We are getting the following error:


function show(menuChoice)
		var el = document.getElementById(menuChoice);
		if ( != 'none' )
				Animation(document.getElementById(menuChoice)).to('height', '0px').to('opacity', 0).hide().go();
				Animation(document.getElementById(menuChoice)).to('height', 'auto').from('0px').to('width', 'auto').from('0px').to('opacity', 1).from(0).blind().show().go();

function hide(menuChoice)
		var el = document.getElementById(menuChoice);
		if ( != 'none' )
				Animation(document.getElementById(menuChoice)).to('height', '0px').to('opacity', 0).hide().go();

Open in new window

Thanks, Greg

I want to count the number of times  an ID exist in an array using Reactjs reduce function. I am using typescript.
Getting error + cannot be applied to number and Boolean,

let count = this.props.controls.reduce(function (n, val) {
            return n + (val.einId == 10);
        }, 0);

        return count;

Open in new window

I know there's a ton of questions around date/time storage and formatting, but I'm struggling to get the right approach. My app is a Node.js app with Express using mongoose with a MongoDB backend. I'm using moment.js to format my date/times.

The schema in question looks like:

const stateSchema = new mongoose.Schema({
  changed: {
    type: Date,
    default: new Date()

Open in new window

Based on the docs, I was expecting the date to be stored in UTC by default, but instead I see this:
changed: 2018-08-15 17:26:14.499

Open in new window

I'm displaying the date/time with something like (pug):

p= `Changed: ${moment(state.changed).format('MMMM Do YYYY, h:mm:ss a')}`

Open in new window

On localhost, the app shows "August 15th 2018, 5:26:14 pm" but on the hosted Heroku app I get "August 15th 2018, 10:26:14 pm." I am expecting "August 15th 2018, 5:26:14 pm" because I'm opening the Heroku app in the same timezone, but it looks like it's giving me the server timezone.

What should I do to make sure the date/time shows up in the client's local timezone?
Cloud Class® Course: Amazon Web Services - Basic
LVL 12
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

I have a 2 node DAG Exchange 2013 CU19.
I am trying to delete any email older than 1/1/2016 for a specific user, but no matter what I do, I get nothing from searchquery filtering.
I Have confirmed Roll group Membership for Discovery Management and Mailbox Import Export.
I tried every format of double and single quotes for the date, and could not find anything.
I then tried to remove something from my mailbox, and get the same thing.
I sent me an email with subject test, and can not find it either.

I have tried:
search-mailbox -identity ttaylor -searchquery subject:test -estimatresulteonly
search-mailbox ttaylor -searcquery subject:test -estiamateresultonly
search-mailbox -identity ttaylor -searchquery "subject:test" -estimatresulteonly
search-mailbox ttaylor -searcquery "subject:test" -estiamateresultonly

I always get the same output
RunspaceId       : 304008d0-fa23-40d9-8867-d6ea567d5b9c
Identity         : Domain/ou/Tim Taylor
TargetMailbox    :
Success          : False
TargetFolder     :
ResultItemsCount : 0
ResultItemsSize  : 0 B (0 bytes)

Any suggestions
Hello Experts,

I’m trying to filter a drop down list based on another dropdown list using SQL/vbscript/hta. I have it working sort of thanks to Experts Exchange where I can populate the dropdowns from the database.

Now, I need to do two things:

1. Filter the dropdown lists
2. Send the values to a text file

The query in the code below shows the data like this:

ARA_PERSON_ID               ARA_TYPE_DESC                     INVOICE_TERM_DESC
0000000                                Student - Credit                       2004 Fall Reporting Term
0000000                                Student - Credit                       2004 Spring Reporting Term
0000000                                Student - Credit                       2005 Intersession Reporting
0000000                                Student - Credit                       2009 Fall Reporting
0000000                                Student - Credit                       2012 Fall Reporting
0000000                                Student - Credit                       2013 Fall Reporting
0000000                                Student - Credit                       2013 Spring Reporting
0000000                                Student - Credit                       2016 Spring Reporting
0000000                                Student - Credit Free               2003 Fall Reporting Term
0000000                                Student - Credit Free               2004 Spring Reporting Term
0000000                                Student - Credit Free               2006 Fall Reporting Term

 But I need it to show like this:
I am needing to deliver some js files to a desktop application that runs in a browser shell.  The reason I am doing it this way is I don't have a web server.  This has been running successfully for months until recently the cdn references to libraries like jquery no longer consistently download each time the app opens.  The app is running on windows 7 and uses IE 11 for the shell.  In replacement of a web server I thought about using SSRS since we have a db server.  I can't get the dba to turn on iis on that server as well but thought about placing the files on ssrs and then pointing the script tag src to http://ssrs-server/ReportServer?/Apps/Libraries/jquery.min.js.  When I test this I see the reference to the file in the temporary internet files folder so it appears to download but the initialization in code of jquery fails as if it were not available.  So maybe I don't fully understand what is being listed in the temporary internet files folder and how the app uses the js file from this location.  Does anyone have any suggestions as to what may be wrong or it there some type of conflict with ssrs in the opening of the file.  I can click directly on the file listed in ssrs in the folder view and it opens like a hyperlink showing the js file content.  Thanks for your input.
For our radio station I want to display on our website, on specific days and hours, images of the current DJ program.

For example: Monday  12:00 AM to 8:00 AM display stationlogo.png
             Monday  8:00 AM to 10:00 AM display DJjoe.png
             Monday  10:00 AM to 12:00 PM  display DJstan.png
             Monday  12:00 PM to 4:00 PM display stationlogo.png
             Monday  7:00 PM to 9:00 PM display DJmike.png
             Monday  9:00 PM to 12:00 AM display statonlogo.png

This will be for all seven days of the week with different schedules on different days. I have seen and tried many php and java scripts from the internet to accomplish this, but so far none of them actually work, or are limited in some way. I assume this has to be on my server so that the times will be consistent across time zones. We are all Vietnam veteran volunteers and not tech experts, so any help is greatly appreciated.

Thank you
Javascript Modular Pattern

Trying to understand the Javascript Modular Pattern
I looked at this example from here:

I do not understand when he called twice the add method, why it incremented the value of sum, I thought it will get reset to 0:

alert(modularpattern.add());    // alerts: 1
alert(modularpattern.add());    // alerts: 2
alert(modularpattern.reset());  // alerts: 0
Thank you.
var scope = "I am global";
function whatismyscope() {
    var scope = "I am just a local";
    function func() {return scope;}
    return func;
Now we will apply these three concepts I mentioned above to define our first modular design pattern:

var modularpattern = (function() {
    // your module code goes here
    var sum = 0 ;

    return {
        add:function() {
            sum = sum + 1;
            return sum;
        reset:function() {
            return sum = 0;    
alert(modularpattern.add());    // alerts: 1
alert(modularpattern.add());    // alerts: 2
alert(modularpattern.reset());  // alerts: 0

Open in new window

I have a array of knockout objects

  function topicInfo(data) { = ko.observable(; = ko.observable(data.Active);
        this.indication = ko.observable(data.indication); = ko.observable(;
        this.title = ko.observable(data.Title);
        this.trainedDate = ko.observable(moment(data.trainedDate).format("MM/DD/YYYY"));

Open in new window

and they are populated with:

        if (data.topics) {
            var maptopics = $.map(data.topics, function (topic) {
                return new topicInfo(topic);

   this.topics= ko.observableArray(maptopics);

Open in new window

And need a distinct based on the name field

        this.activeTopicsDistinct = filterByFirstOccurance(this.activeTopics(), "name");    // make it easy for the HTML to display

Open in new window

audio works in all desktop browsers but on mobile IOS Safari it doesn't work.

When I click on play the audio doesn't play on Safari which i running 11.4.1
I would like to create a "sticky" header nav bar that will always be on the top of the page, when you scroll.

But I want the nav bar to animate by shrinking a little bit. Here is a perfect example of exacty what I am tring to do:

I would like to have it work just like that, where the phone number and such reamains until you scroll, and then disappears and the menu logo actually shrinks a little.

Can anyone help me out with a tutorial or short example? I love this effect, and really want to learn it for my next project.

Thank you!
I had this question after viewing Change a specific key value in app.config file with another value..

i have  a config file as below
    <server name="EDMServer" description="EDMServer" username="" password="" integratedSecurity="true" />
    <server name="EDMServer" description="EDMServer" username="" password="" integratedSecurity="true" />
    <add name="ExposureSource" value="path" />
    <add name="DomainDatabase" value="Server=HeadNode;Initial Catalog=RMS_MEE_Data;Integrated Security=True;" />
    <add name="ResultsDatabase" value="Server=HeadNode;Initial Catalog=RMS_MEE_Results;Integrated Security=True;" />
    <add name="JobManagerService" value="url" />
    <add name="licensecode" value="code" />
    <add name="WhiteListedIPAddresses" value="*" />

 in settings , i want to change the name which contains licensecode to newcode. how do i do this.

$ConfigFile = 'C:\Users\psman\Downloads\dev_qa.config'
## XML Node names and Attributes are CaSe SeNsItIvE!
$xml = [xml](Get-Content -Path $ConfigFile)

$xml.SelectSingleNode("meeservices/settings/add[@name='licensecode']").SetAttribute("name", "data1")

Creating Active Directory Users from a Text File
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.


I am trying to pass a div id from XSL to Java script to open the value of div in a modal pop up.
I used the following code -
Only difference between the code in this jsfiddle and mine is, I need to do it for multiple div values. PFB a sample of my code.

<html lang="en">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta charset="utf-8">
      <title>jQuery UI Dialog - Default functionality</title>
      <link rel="stylesheet" href=""><script src=""></script><script src=""></script><link rel="stylesheet" href="/resources/demos/style.css"><script>
          $(function() {
            $( "#{$AID}" ).dialog({autoopen: false});
            $( "#{$AID}" ).dialog("close");
          $(document).ready(function() {
            $('#{$CID}').click(function() {
              $( "#{$AID}" ).dialog({ modal: true });
      <div class="section">
					<div colspan="4" class="sectionHeader">
					<xsl:for-each select="/file/notes/note">
					   <table width="100%" class="clsGridTableBase">
                                <xsl:variable name="CID" value="generate-id()"/>						
								<td id="{$CID}" title = "Click to View Content">

Open in new window

I need help with a DataTable.  I need to filter out rows that meet a certain criteria.  I am using grouped tables like this:

            "aaSorting": [],
            "pageLength": 1000,
            "columnDefs": [
                { "visible": false, "targets": 1 }
            "drawCallback": function (settings) {
                var api = this.api();
                var rows = api.rows({ page: 'current' }).nodes();
                var last = null;
                api.column(1, { page: 'current' }).data().each(function (group, i) {
                    if (last !== group) {
                            '<tr class="group"><td colspan="9">' + group + '</td></tr>'
                        last = group;

Open in new window

I have searched and found this code:

var filteredData = table
                    .filter(function (value, index) {
                        return table.row(value).data()[9] == "Complete";

Open in new window

I'm not sure where to place this within the grouped table function.  I tried adding it after the draw Callback Function and I get table not defined errors.

Thanks for any help!
Hello Experts,
I hope somone can help.... I am using MapBox for one of my projects with 3 layers for each POI type. Each POI layer using a custom icon SVG I uploaded via the MapBox Studio.
I am showing a popup when the user click on each POI and the popup is position fixed on the Map.
Currently the size of the icon SVG is set at 0.75. I need somehow to increase the size of the icon or replace the icon (what ever is easier) when the user click or mouseover each POI.
Below is my current script:

mapboxgl.accessToken = 'xyz'; 
	 var geojson = {
		type: 'FeatureCollection',
		features: [{
			type: 'Feature',
				geometry: {
					type: 'Point',
					coordinates: [19.225290,56.551136]

		var map = new mapboxgl.Map({
			container: 'map',
			style: 'mapbox://styles/xyz/cjk4c9eaj2tv22rqp316keuaq',
			center: [19.225290,56.545136], // starting position [lng, lat]
			zoom: 13.5,
			scrollZoom: false,
			pitch: 10,

var lastZoom = map.getZoom();

map.on('zoom', function() {
  const currentZoom = map.getZoom();
  if (currentZoom < 13 || currentZoom > 14) {
  } else {

  lastZoom = currentZoom;

map.on('load', function() {
	var layers = ['slf-urban', 'slf-land', 'slf-park'];

	var layer = $('#map-filters input[type="checkbox"]').on("change", function(c) {
		var thislayer = $(this).attr("id");
		if(thislayer == "slf-all") {
			for (var i = 0; i < layers.length; i++) {

Open in new window

Morning all, I'm looking for some code that will enable IE and Chrome to go fullscreen when the web page opens. We have a number of browsers, so a single bit of code would be great.

I've added the current code I have.

What would be the best method to achieve this?

Many thanks

<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<body bgcolor="#000000">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" width="1280" height="1024" id="Edward" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="Edward.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="Edward.swf" quality="high" bgcolor="#000000" width="1280" height="1024" name="Edward" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="" />

Open in new window

Hi I have this page where a background image blurs on Scroll (transition to a different image) + Simple Parallax. It works great in Chrome, but not working as expected in IE11. It's not broken, per se, just not working as intended.
I am trying to export the div content to PDF using jsPDF

function demoFromHTML() {
    var pdf = new jsPDF('p', 'pt', 'letter');
    // source can be HTML-formatted string, or a reference
    // to an actual DOM element from which the text will be scraped.
    source = $('#customers')[0];

    // we support special element handlers. Register them with jQuery-style 
    // ID selector for either ID or node name. ("#iAmID", "div", "span" etc.)
    // There is no support for any other type of selectors 
    // (class, of compound) at this time.
    specialElementHandlers = {
        // element with id of "bypass" - jQuery style selector
        '#bypassme': function (element, renderer) {
            // true = "handled elsewhere, bypass text extraction"
            return true
    margins = {
        top: 80,
        bottom: 60,
        left: 40,
        width: 522
    // all coords and widths are in jsPDF instance's declared units
    // 'inches' in this case
    source, // HTML string or DOM elem ref.
    margins.left, // x coord, { // y coord
        'width': margins.width, // max width of content on PDF
        'elementHandlers': specialElementHandlers

    function (dispose) {
        // dispose: object with X, Y of the last line add to the PDF 
        //          this allow the insertion of new lines after html'Test.pdf');
    }, margins);

Open in new window







JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and  in almost every mainstream web browser.