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

I have a bootstrap modal appear, the user can enter UPC codes. The user will have a tablet and a scanner, so they want minimal mouse usage.

They can enter X number of UPC codes each having a quantity associated with it.

I have two roadblocks:

1. Once the user TABS from UPC field to QTY field, I want the SPACEBAR to trigger #2 below

2. Then the form will sort of "animate" slide to left, and another blank field will appear allowing them to continue entering products. All the while , adding to a javascript array

3. Finally when they click the ALL DONE button, simply console.log the array ( I will be able to take it from here ).

Can anyone get me up and going?

Thank you very much..

UPC Modal
Cloud Class® Course: Microsoft Exchange Server
LVL 12
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Hey, This is just a decision-making problem. I am seeking for a well thought out answer.
I have to develop an android XMPP chat application, (the application also has a NodeJS server API, connecting to MongoDB and AWS S3 for picture uploads)

which will be better:

1. Having a "openfire" server on aws and connecting it to the android application and implementing an XMPP client on the android device using "smack" library.

2. Implementing a "xmpp-client" on NodeJS server side and scrape the results from this API to the Android device.
I have to validate a text field in which only numbers,dots and commas are allowed. Apart from these 3 if I input others then it should throw error.
Pls suggest
I have a web page which contains 6 CKEditor instances, using the AutoSave plugin.

The AutoSave plugin works perfectly with single instances on a page but not with multiple instances. Multiple instances cause erratic behavior in that 6 prompts relating to autosaved content are displayed one at a time, but they are unresponsive.

I appreciate that each CKEditor instance requires a unique ID (as is illustrated in the code below) and research has shown me how to set these IDs within CKEditor.replace but for the life of me, I cannot get it to work.

I have tried different browsers and cache cleaning, to no avail.

The following code is in a loop of 6 iterations within a table. I have verified that the ColdFusion variable values are correct. The autosave_Savekey range is "autosave_2" to "autosave_7".
<textarea name="text_value_box#agi_array[agi][5]#" cols="78" rows="<cfif #agi_array[agi][4]# EQ "R">4<cfelse>8</cfif>" #route_form#>#getItem.text_value#</textarea>
<script type="text/javascript">
    CKEDITOR.replace( 'text_value_box#agi_array[agi][5]#',
        customConfig: '#Editor.customConfig#',
        allowedContent: true,
        autosave_SaveKey: 'autosave_#agi_array[agi][5]#',
        toolbar: '#Editor.toolbar#'
        <cfif isDefined('Editor.font_names')>
        , font_names: '#Editor.font_names#'
        <cfif isDefined('Editor.fontSize_sizes')>
        , fontSize_sizes: 

Open in new window

Just getting to grips with the whole Service Worker JS concept.

Am I correct that a Service Worker is a  JS script, produced by a website, that resides locally on a browser. It then runs on a regular interval doing something?

For example the service worker could ping a server every minute when teh browser is open, even when a person is not on that site, checking for messages or something?
I have multiple row of td that i retrieve from database. Now I have to to keyup for each row once i input value into LUAS_KESELURUHAN AND LUAS_KEKOSONGAN textbox. The answer must be display on REMISI textbox.. I have used javascript for this action but it only keyup this action for the first line..can someone here help me since i have stuck for this problem for a few days..Thank you

And here is my code:
function kira1(){
	var LUAS_KESELURUHAN = document.getElementById('LUAS_KESELURUHAN').value;
	var LUAS_KEKOSONGAN = document.getElementById('LUAS_KEKOSONGAN').value;
	if (LUAS_KESELURUHAN != "" ){
	document.getElementById('REMISI').value = remisi;

while($rowChk = $resultChk->fetch(PDO::FETCH_ASSOC)){
		echo "<tr>";
		echo "<form id='makRemisi' method='post'>";
		<div style="display:none;">
		echo "<div id = 'show_idx'>";
		echo "<td>"?><input type="text" name="LUAS_KESELURUHAN" id="LUAS_KESELURUHAN" onkeyup="kira1()" value="<?php print $rowb["LUAS_KESELURUHAN"] ?>"><?php " 
		echo "<td>"?><input type="text" name="LUAS_KEKOSONGAN" id="LUAS_KEKOSONGAN" onkeyup="kira1()" value="<?php print $rowb["LUAS_KEKOSONGAN"] ?>"><?php " 
		echo "<td>"?><input type="text" name="REMISI" id="REMISI" value="<?php print $rowb["REMISI"] ?>"><?php "</td>";
		echo "<td>"?><input class="easyui-filebox" name="fileName[]" 

Open in new window

I'm looking for a PowerShell or command line script (or utility) that will query all Active Directory computers (or a list of the computer names I provide in a CSV or text files) that will create a text file listing the dates and times the operating systems on these computers were last rebooted or how long the operating systems have been running since the last reboot.

Are there any existing programs or utilities that will do this?

Or can someone write a script for me that will do this?
can anyone make js code can do that

execute as @e[type=input] run data merge element @s {value:"foo"}

do it like minecraft commands
i have simple idea

function command(str){
var arg = str.split(" ")
if(arg[0] == "say"){

Open in new window

command("say 123")
//in console will show 123

this like minecraft command line

anyone have idea to improve my project :D it will be massive project :D
Is there a way from a SharePoint LIST workflow to create a SharePoint Document Library or a folder in an existing library?

From our List application we need an ability to trigger the creation of a site.
Hi, Experts, I wish to write something on the td of the table whos id is myProlist3. How could I make  it with the codes below?  In the codes below, I want to do something like this td:eq(1).html = b;

$(function() { 
  $(document ).on("click","#myProlist3 button.NewQty14",function(){
    let tr = $(this).closest('tr');
    let a = tr.find('td:eq(0)').html(); 
    let b = tr.find('input')[0].value; 
    //This is what i need
    td:eq(1).html = b;


Open in new window

Ultimate Tool Kit for Technology Solution Provider
Ultimate Tool Kit for Technology Solution Provider

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 now.

I have a slider and when I click on a nav button, I want to put the class "active" on one element and "active2" on another one. I thought this would work, but it doesn't

<script type="text/javascript">


Open in new window

I have numerous DIV's in my page which hold barcodes, for example:

<div id="wrapper">
<svg id="barcode1"></svg>
<svg id="barcode2"></svg>
<svg id="barcode3"></svg>
<svg id="barcode4"></svg>

Open in new window

I need to print each barcode on a new page (per client request - I don't know why)

My question is, when the user clicks the PRINT button ( a jquery button I made with a click handler) on page, how do I only print whats in my wrapper, and also how to make sure each one is on own page?

Thank you for looking.


Do you have a Android spinner (drop down list) example?
Contractor came in and set up a Production SP site.  A duplicate site was set up for staging.  They have 2 different pool#s.  
If a .wsp file is created does it automatically update both sites?    
There are several sites on the farm.  If it does affect both sites then why doesn't it affect the other sites on the same farm.

There's 1 server 1 farm.

Please help me in this jquery script.

I have the HTML table with checkboxes in each row in the first column and the ID column as the second column . This table has pages , when i click on the second page and come back to the first page , all the checked checkboxes are unchecked.

I created the jquery code to get the ID's and save it in the hidden textbox .

Now am trying to get  those values from the hidden textbox and put it in the array to check the checkboxes. How can i do this ?

 $(document).ready(function () {

        var array = $('#txthidden').val().split(",");
        $.each(array, function (i) {
            //how to check the checkboxes based on the ID column value .

Thanks for your help!.
I  have a function defined in the head of an html page as follows:

function WriteToFile(passPostTest) {
    set fso = CreateObject("Scripting.FileSystemObject"); 
    set s   = fso.CreateTextFile("c:/spider/posts.txt", True);
    s.writeline("Post :" + passPostTest);

Open in new window

I call the function from the following html code
<a href="#" onclick="WriteToFile(passPostTest);">Save Post</a>

Open in new window

the console returns the following error "Uncaught ReferenceError: WriteToFile is not defined  at HTMLAnchorElement.onclick"

I am lost as to why its reporting it as undefined.  BTW  passPostTest is a javascript global variable
I have USB token and when it plugged in , it installed personal certificate into browser (chrome).
which i confirmed by go to setting -> menage certificates ->personal.

I just want to know is there any method i can show list  (or read public key) of that certificates on my web page?
I read web crypto api but i found it doesn't have any function.
I have issue where the multiple tab able to switch accordingly with the content but the link does not change at all. I have try to do it using
<li><a target="_blank" href="#tab_a">Test</a></li>

Open in new window

the link does change according to the tab but it open in new tab instead. Is there any way I can do where I can click on any tab, the link and content change according to tab clicked but remain in the same page instead of go to new tab.1.pngScenario(Red box): I firstly go to LinkParis(the link will show LinkParis). Then I go to LinkLondon to see the content, the content did change but the link remain at LinkParis.
2.pngBlue Box: This is the expectation result. No matter which tab I click, the link will change accordingly and remain the same page(not new tab).
Hi All,

We are developing a application primarily using web api, entity framework, angular js, sql server and C# and hosted on dedicated server running single web site on IIS
Once we have done the data migration (loaded about 150K records)  we have noticed application performance was deistically reduced.
Eg. Service call takes about 15 -20 second (GET) and post is about 20 – 30 seconds.
To overcome this issue I thought of converting some of the codes into stored procedures.

Apart from doing so what we can do in IIS to gain performance boost.
Cloud Class® Course: Microsoft Office 2010
LVL 12
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

I have a web app made in PHP and JavaScript that is showing a mix of graph (made with D3 and C3) and text.

The goal is to allow the user to share what he sees with a simple button; this includes, in this stage, to:
 - convert the whole page into a PNG/JPEG image
 - share the image to some social media (facebook/twitter).

Next step would be to give the user the possibility to choose which part of the sreen he wants to share.

I DONT want to add extra layer like Angular (and other similar frameworks) and try to stick to pure PHP + Javascript code.

Any suggestion how to do it
Hello. The revert option is not working as expected,

My ember Code is:

        name: "AdminUser",
        icon: 'admin',
        logical: function () {
            return Admin.Role.detectInstance(this.get('model'));
        titleView: Core.view.Message.extend()
                tagName: 'h2',
                key: 'admin/role-inspect/details/title'
        bodyView: Admin.RoleDetailsView.extend()
                roleModelBinding: 'inspector.model',
                readOnly: function () {
                    return !this.get('roleModel.canModify');
                hasChangesChanged: function () {
                    if (!Admin.RoleInspect.Inspector.detectInstance(this.get('inspector'))) { return; }
                    this.get('inspector').set('hasChanges', this.get('hasChanges'));
                roleModelCopyChanged: function () {
                    this.set('inspector.roleModelCopy', this.get('roleModelCopy'));
        actionsView: Inspect.EditableModelFooter,
        save: function () {
            var model = this.get('model'),
                copy = this.get('roleModelCopy'),

Open in new window


I'd like to start by saying I am new to SP and trying to build an employee directory. I am using a guide from hyperfish ( I am having a problem with thumbnails on the results page. They show as broken images. Looking at the template I believe this is where the variable is being set for the source image

            if(!$isNull(ctx.CurrentItem) && !$isNull(ctx.ClientControl)){
                  var encodedPath = $urlHtmlEncode(ctx.CurrentItem.Path);      
                  var accountName = ctx.CurrentItem.AccountName.substr(ctx.CurrentItem.AccountName.lastIndexOf('|') + 1);
                  // Use size M and 72px for medium instead of small                  
                  var picUrl = '/_vti_bin/DelveApi.ashx/people/profileimage?size=S&userId=' + accountName;
                  var css = 'min-width: 48px;min-height: 48px;clip: rect(0px, 48px, 48px, 0px);max-width: 48px;';

I really don't even know where to start to find what the path should be. When i try t update the URL to anything the whole page fails with this error:

Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.

Template '~sitecollection/_catalogs/masterpage/_EmployeeDirectory/Display Templates/Search/Item_Person_Table.js' not found or has syntax errors. (LoadTemplate: ~sitecollection/_catalogs/masterpage/Display Templates/Search/Group_Default.js)

I really would …
Dear Experts

Below is a button script on my Adobe Acrobat Form that  that performs the following action:

All the fields with the exception of field names that start with 'mtx' will get the fillColor 'Gray'.

for (var i = 0; i < this.numFields; i++) {
    var f = this.getField(this.getNthFieldName(i));
    var reg = /^mtx/;

    if (f != null && == null) {
        f.fillColor = color.ltGray;

Open in new window

How is the code to be changed, if there are more field names that should be excluded, such as field names that start with 'gsl' and 'ktn'

Help is much appreciated. Thank you very much in advance.

Regards, andreas
I am using a JS library to drag the controls on my PAGE to perform different functions. Checkout the demo by clicking on this link:

Open in new window

1) When the page loads, see the right side and click on the icon.
2) Then you will see a snippet there. Just drag it on the page.
3) After that a button will be visible on PAge. Click on it and fill the form fields and fill the data with integer values and click on save.
4) The values are stored in DB.

What I want:
1) When you click on Table or button, you will notice that some additional buttons/controls  will appear. Click on the last icon which is a delete icon. You will notice that control will be deleted from the page. But values are still saved in Database.

I want that if user click on delete icon then its data from the table must be deleted from the database.

Need code help that on which event I will set the ajax call to delete data against that control.

Note: If user drag a control on page then following event is called:
	$('.ui-droppable').on('sortstop', function(e,i) {

Open in new window

Looking for expert opinion

We had same issue but unable to find cause. it happened at random time.No logs from ESX host,network switch. looks it is not communicating internally.error :
Cluster network interface 'node-03 - VLAN 10' for cluster node 'node-03' on network 'Cluster Network 1' failed. Run the Validate a Configuration wizard to check your network configuration. If the condition persists, check for hardware or software errors related to the network adapter. Also check for failures in any other network components to which the node is connected such as hubs, switches, or bridges.
Please advise solution






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.