We help IT Professionals succeed at work.


JScript is Microsoft's dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer. JScript is implemented as an Active Scripting engine, so it can be "plugged in" to OLE Automation applications that support Active Scripting, such as Internet Explorer, Active Server Pages, and Windows Script Host. It also means such applications can use multiple Active Scripting languages, e.g., JScript, VBScript or PerlScript.

Powershell Experts, question. I run this script to remove all AD Groups from users that are being off-boarded. Works great, the only  thing is that when it loops through, it asks me after each one it loops though. Even when i click yes to all it still goes on to the next group and asks permission again to remove. Am i missing a parameter or what am i doing wrong? I want it to loop through, remove all AD groups for the AD user object and not ask me if its OK to remove.

Get-ADUser $disableduser -Properties MemberOf | Select -Expand MemberOf | %{Remove-ADGroupMember $_ -member $disableduser}

Open in new window


How can I alert the user if they enter From date greater than To date?

var StartCreateDate = $('#FromCreatedDate').val();
var EndCreateDate = $('#ToCreatedDate').val();

  if ((StartCreateDate != null && EndCreateDate != null) && (StartCreateDate > EndCreateDate)) {
            alert("From create date must be greater than to create date")
            return false;

Open in new window

I need a regular expression to test for mm/dd/yyyy dates at the beginning of lines in a form field, as in the example below:
·07/29/2019 event 3
·07/08/2019-event 2
·05/29/2019: event

Users can enter as many dates and details as they want, but I need to verify the date format.

Users may also enter only one date, as below.

07/29/2019 event

Here's what I have (that doesn't work):

var dateString = /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/

But I don't know how to test (or ignore) the bullet character. I've tried .  I've tried \·  

But none of my efforts find the lines below valid (though I want them to be accepted):

·07/29/2019 event 3
·07/08/2019-event 2
·05/29/2019: event

Here's the context in my javascript:  else if(!dateString.test(theForm.EI16.value)) {alert("Please use mm/dd/yyyy format for all dates.");theForm.EI16.focus();return false;}

Who can help?
In a web app for which I'm responsible, I've been asked to sort contents of a form field by date descending using the date that starts each list item. I'd like to do this either onBlur or  onSave because users are entering stuff willy-nilly. In any event, though I can very easily sort items alphabetically using javascript's array sort() method, sorting by date substring descending is whole 'nuther kettle of fish.  

Here's an example of what I'd need to sort by date descending (and yes, each item has a bullet char):

•01/21/2013 - something happened; something else happened on 01/30/2013.
•04/02/2014 - John J. buys a new car
•02/25/2014 - We went to a movie. It was awesome, but a better one comes out on 12/31/2019.
•05/21/2012 - Let's keep sorting things.

Let's say the above is all included in a form field with id=myActivities. I'd like to, onBlur, get this:

•04/02/2014 - John J. buys a new car
•02/25/2014 - We went to a movie. It was awesome, but a better one comes out on 12/31/2019.
•01/21/2013 - something happened; something else happened on 01/30/2013.
•05/21/2012 - Let's keep sorting things.

Any brilliant sorters out there? I'm at your mercy.

By the way, in a windows app I can use to edit/update existing content, I use the (slightly proprietary looking) jscript code below. It works properly, but it's simple alphabetical sorting. Nothing to do with substring dates.


var sortBox = new Array("Events");…
JavaScript - Pass JS Variable Value to Hidden ASP.net Form Field so VB.net code can use that value on post back

I have this code i am working with right now below in Code Block...

This code creating a count integer variable (howManyUnhidden) that i want to pass to the hidden ASP.net field...

Code Solution One: https://www.codeproject.com/Questions/708697/Pass-javascript-variables-value-to-Csharp-code-beh

Code Solution Two: https://stackoverflow.com/questions/14977491/pass-javascript-variable-to-c-sharp-code-behind

Which is better ?? --- Best way to go... Most robust ??

Or maybe a BETTER code example to show me that is a better way to go... ?

$(function () {
           var howManyUnhidden = $("#HiddenField1").val() || 0;
          $('.childblock:lt(' + howManyUnhidden + ')').show();

          $('#addChildBlock').click(function (e) {
             var block = $('.childblock:hidden:first');
             if (block.length) block.show();
             if (howManyUnhidden <= 4) {

          $('.closeChildBlock').click(function (e) {
             if (howManyUnhidden > 0) {

Open in new window

Hi experts

    Bootstrap columns are not aligning side by side.  Please see the below reactjs code

  <div className="container-fluid" style={{margin:0,padding:0,height:'auto',minHeight:'100%',minWidth:'100%'}}>
                <div className="row">
                     <div className="col-12 col-sm-12 col-md-7 col-lg-7 col-xl-7" style={{height:'auto'}}>
                     <div className="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4" style={{color:"#6F7070",
                          <div className='selectable' style={{fontSize: 18}}>
                                 <div style={{fontSize:24, fontWeight:'bold'}}>{record.title}</div>
                                     <div style={{fontSize:12, fontWeight:'bold'}}>Date Created:{date}</div>
                                     <div style={{fontSize:12, fontWeight:'bold',fontStyle:'italic'}}>{record.type}</div>
                             <div style={{display:'inline-block',margin:0,padding:0,marginTop:15,marginBottom:10}} className="row">
                                 <span> Details <hr style={{height:3,display:"inline-block",backgroundColor:"#AAC33C",

Open in new window

I have built an HTA application with JScript language and VbScript. I am trying to pass the value of JScript variable to VbScript, but I am stuck. Can you please help.  Here is the JScript code: (I need to pass the docNum [ ] and rev [ ] values, as there may be multiples.)

<script type="text/javascript">
            var room = 1;
            function add_fields() {
                  var objTo = document.getElementById('room_fileds')
                  var divtest = document.createElement("div");
                  divtest.innerHTML = '<div class="content"><span>Document Number: <input type="text" style="width:150px;" name="docNum[]" value="" /></span><span>Rev: <input type="text" style="rev:20px;" name="rev[]" value="" /></div>';

<script language="VBScript">
      Option Explicit

      Sub ProcessInfo_OnClick
       End Sub
Thank you
How to get multiple values from N # of same class name? In the example below I want to grab the text whenever there is a class name of  "offer-product-label" and divide with a pipe. If there is a currency amount, strip to only dollar amount. So the below example would return => "Line of Credit|450000"

I started with:
var pResult;
	    var prodResult = document.getElementsByClassName("offer-product-label");
        for (var i = 0; i < prodResult.length; i++) {
            pResult = prodResult[i].innerText;

Open in new window

for the below:
<fieldset class="fieldset-line">
                            <legend tabindex="0">Request summary</legend>
                            <dl tabindex="0">
                                <dd class="offer-product-label">Line of Credit</dd>
                            <dl tabindex="0">
                                <dt>Amount Requested</dt>
                                <dd class="offer-product-label">$45,000.00</dd>


Open in new window

We have a Dynamics 365 On Premise implementation that was upgraded from CRM 2011.  There is a dashboard that is based on an IFrame and web resource.  The jscript in the web resource has deprecated code from CRM 2011 and the dashboard does not render as expected.

We need some guidance on revising the web resource code (listed below).  Specifically, changes needed to make the web resource compatible with Dynamics 365 is our primary concern. (Note: there is also html code and a call to an aspx file but these do not appear to be the problem).

Please advise on correcting the code to work with Dynamics 365.

//<script src="ClientGlobalContext.js.aspx"></script>
//<script language="javascript">
	function SetReport() {
	    var id = qs("data");
	    if(!IsGuid(id)) {
	        var msg = "Please enter a valid report ID in the Custom Parameter (data) box.";
	        msg += "\n\nMake sure that %7b from the beginning and %7d from the end of the link are not included in the report ID."
	    //var serverAndOrgUrl = getServerUrl();
	    var clientUrl = Xrm.Page.context.getClientUrl();
	    var iframeSrc = clientUrl + '/crmreports/viewer/viewer.aspx?action=run&id=%7b' + id + '%7d';
	    var report = document.createElement("iframe");
	    report.setAttribute('id', 'reportFrame');
	    report.setAttribute('name', 'reportFrame');

Open in new window

On my blog page here http://ccdenver33.staging.wpengine.com/blog/ how can I make it so that the menu tab Blog Posts has a border around it but just when you're on that page?
Delete digits after two decimal points, without rounding the value in javascript/jquery
var a=987.687
but i need the value like 987.68
how to get value like that
Hi experts, I am using bootstrap 3
I have a page with 4 dropdown options and 4 number INPUT with different ids (see dropdown 1 below)
How can I add an eventlistener to either the dropdown or number input changes its value ?
What I am trying to accomplish is calculate the price on the fly (ajax and php)
P.S. I can calculate the price IF THE USER CLICKS A BUTTON, but I want to do the same calculations WITHOUT THE USER CLICK THE CALCULATE PRICE BUTTON

Tnx for any help or suggestions

    <div class="form-row">
     <div class="form-group col-sm-5">
        <label for="sel1" class="control-label">Select list :</label>
        <select class="input-large" id="sel1">
          <option value="399">Nativity Set - 399.00&#160;&#160; </option>
          <option value="189">Deer Set - 189.00&#160;&#160; </option>
          <option value="35">Sheep - 35.00&#160;&#160;</option>
          <option value="35">Cow - 35.00&#160;&#160;</option>
          <option value="35">Donkey - 35.00&#160;&#160;</option>
          <option value="35">Goat - 35.00&#160;&#160;</option>
     <div class="form-group">
      <label for="iQ1" class="col-sm-2 control-label">Quantity</label>
      <div class="col-sm-2">
        <input type="number" class="form-control" id="iQ1" value="1">    
We are running Dynamics 365, version, On Premise.  A quote product editable grid on the quote is not editable.  

We have tried downloading a solution from GitHub but it did not resolve the issue.

My question is; are editable grids supported on the Web control for Dynamics 365, 8.2.2 On Premise?

If not, is there are workaround?

I am developing a around 300 HTML web pages that need a version number displayed in the footer. Problem is some customers are using version A and some people are using version B. So depending on the user, I want to display A or B and only want to change it in one place. I have used document.write and pointed to a .js named ver.js file which contains

document.write('Test: V4.5')

Open in new window

and the HTML to display on the page:
<script language="javascript" type="text/javascript" src="ver.js"></script> 

Open in new window

My question is, if I have three different versions I need to display depending on the user, what is the best method to display ('Test: V4.5') or ('Test: V4.6') or ('Test: V4.7') using  JavaScript which would be written in one place. I don't want to have to hand write the version number on each page, but only in one spot. I asked this question on Stack Exchange and got beat to hell by those who answered. Can you guys help? I am trying to learn this and hope I am asking this question the right way.

Further, lets say user ONE should see Version 4.5 on the bottom of their page, and user TWO should see Version 4.8 at the bottom of the page. And since I have 300 pages, I only want to change the version in one place to be reflected on all 300 pages?

I know I can use Variables, but not sure the correct way to do this. I am not using PHP.

Thank you for not yelling at me.
I've reviewed the article by Julian Hansen detailing how to create linked dropdowns using JQuery and PHP. However, how would I go about this if I have the data stored in different folders located on a server?

Ex. Main Folder > Sub Folder > 3rd folder > Document

1st Dropdown list will provide a list of states (list extracted from Main Folder)

2nd Dropdown list will provide a list of cities (list extracted from Subfolder, dependent on 1st dropdown selection)

3rd Dropdown list will provide a list of counties (list extracted from 3rd folder, dependent on 2nd dropdown selection)

4th dropdown list will provide a list of word/excel/pdf documents (list extracted from document, list is dependent on 3rd dropdown selection)

The form should display as a popup form, with submit and clear buttons.


My button don't work but alert work after success, what should I do ?

<!DOCTYPE html>
<html lang="fr">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/gif" href="img/drapeauBruxelles.gif" />
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
    <title>Projet Map</title>
       #map {
        height: 600px;
        width: 90%;
    <div class="container-fluid bg-2 text-center">
      <h1 class="margin">Des Marqueurs Google Maps</h1>
    <div id="map"></div>
    <nav class="navbar navbar-default">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          <a class="navbar-brand" href="https://developers.google.com/maps/documentation/javascript/adding-a-google-map?hl=fr">My Google Maps</a>
        <div class="collapse navbar-collapse" id="myNavbar">
          <ul class="nav navbar-nav navbar-right">

            <li><button type="button" id="btn1">Fontaine d'eau</button></li>
            <li><button type="button" onclick="actionImmediate();">Fontaine d'eau</button></li>

Open in new window

I want my splash page to have my menu and logo at the top, but then have an image that fills the entire remainder of the screen and resizes for varying resolutions as needed. Down on the image will be my log in panel.

I just need to know how to code the image aspect of this.

Is that possible?

If not, just have the image as the background filling the entire screen?

I think I read WHY this is happening but not sure how to fix it. If you visit


The slideshow slides stack and then finally start the slideshow. I don't want the user to see this issue and have read a few css ideas and a few java ideas. Since I'm not experienced in Java at all, I'm not sure where to put a fix to resolve this. The page source code should show my script and css for it.

I need someone to show me where to put a fix on this in my code.
Hi All,
Advance thanks!
I am using ASP.NET MVc core and jqgrid in the ui. I receive both date string (Last Update) and actual date field (DocumentSubmissionDate). I need date field only, i added in the view to take snapshot to display here.  My issue is i need to display date field just like that string date (i.e. mm/dd/yyyy by remove T and show AM/PM). Please find the script below

<script type="text/javascript">
    $(document).ready(function () {
        var $DocumentData = $('#jqgClaims');

        $(window).bind('resize', function () {
        //$("#jqgClaims").setGridWidth($(window).width() / 1.03);
        //$("#jqgClaims").setGridWidth($(window).width() / 1.47);
        jQuery("#jqgClaims").setGridWidth($('#parentDiv').width() - 10, true);

            url: '@Url.Action("GetDocumentList", "wsApproval")',
            datatype: 'json',
            mtype: 'POST',
            cmTemplate: { align: 'left' },
            colNames: ['Claim No', 'Doc No', 'Document Name', 'Document Status', 'Last Update','DocumentSubmissionDate', 'Supervisor Id', 'Examiner Id', 'Reassign Id','test' , 'DocumentTypeCode'],
            colModel: [
                        { name: 'ClaimNumber', align: 'left', search: false, hidden: false, width: '80%' },
                        { name: 'DocumentNumber', align: 'left', search: false, hidden: true, width: '80%' },
                        { name: 'DocumentTypeName', …
I have a button on my razor page which loads a javascript file that I need to debug into. But I can not set a breakpoint there since the file does not exist in the list, on the Chrome debugger.

How do I get that file to load so I can set the debugger?

Hi experts, I wish to save a certain data into two DataBase. I have sOrder and xOrder Database. I want my code below can execute two actions by saving the data into two database. Is it possible? If not, is there any other way to meet the goal? Thank you!  

dim pname,pcode

pname = "Mango"
pcode = "8900"
'I have two DataBase sOrder and xOrder the two has a commom table name, Stock. I wish to save here the data in a two database. 
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")

cn.ConnectionString = "driver={SQL Server};server=PCSERVER;uid=;pwd=;DataBase=sOrder"
   Set rs = cn.Execute("Select Procode, Proname From Stock where Procode='" & pcode & "'")
           with rs
               If .BOF = True And .EOF = True Then
                        cn.execute("Insert into(Procode,Proname) values('" & pcode & "','" & replace(pname, "'","''") & "')")
				            set cn = nothing
               end if
           End with
   Set rs = nothing

Open in new window

how can I integrate a search engine on my website , using js , php and mysql ?
NB . the user can search any thing inside the site!
Hi all,

I have made a jquery image slider and it works fine however I need to add some additional functionality and am struggleing.

I just need to make the two arrows work so when they are clicked it will scroll through the gallery left and right.

any help asap would be great

here is the code :

$(document).ready(function () { // this function loads all code before it runs

    var timer = ''
    var currentImage = $('#slideShow > div:first') // set first Image for slideshow
    var currentThumb = $('#thumbs > img:first') // Set first Image for Thumbnails
    $('#end').attr('disabled', 'disabled') // attach disabled attribute to end button
            "background": "#e74c3c"
            , "opacity": "0.3"
            , "cursor": "not-allowed"
        }) // set css rules when the end button is inactive
    $("#slideShow > div:gt(0)").hide(); //hides all images greater than 0 
    $("#thumbs > img:eq(0)").css({
            "border": "2px solid #3498db"
            , "opacity": "1"
        }) // set css rules for active thumbnail
    function start() {
        timer = setInterval(function () {
            $('#slideShow > div:first') // Target div Element within #sideShow
                .fadeOut(1000) // fade out current image
                .next() // select next element 
                .fadeIn(1000) // fade in next element
                .end() // End the process 
                .appendTo('#slideShow'); // add functionality 

Open in new window


I have a slideshow, that needs to disable the thumbnail hover when I click the start button and also activate the thumbnail hover when I click stop,

Any ideas on how to do this??

This is the code I have so far ;


<!DOCTYPE html>

<title>Slide Show </title>

<script type="text/javascript" src="js/slideshow.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css" />


<body onresize="rescale();">

<div id="main">

<h1 id="heading">Slide Show</h1>

<img id="image" src="images/1.jpg" />

	<span onclick="changeImage('grand canyon')" onmouseover="previewImage(1)" onmouseout="revertImage()">Image 1</span> | 
	<span onclick="changeImage('lake')" onmouseover="previewImage(2)" onmouseout="revertImage()">Image 2</span> | 
	<span onclick="changeImage('flower')" onmouseover="previewImage(3)" onmouseout="revertImage()">Image 3</span> | 
	<span onclick="changeImage('turtle')" onmouseover="previewImage(4)" onmouseout="revertImage()">Image 4</span> | 
	<span onclick="changeImage('bird')" onmouseover="previewImage(5)" onmouseout="revertImage()">Image 5</span> 

<button id="startBtn" onclick="start()">Start </button> 
<button id="stopBtn" onclick="stop()">Stop </button>

<!--<p><a href="javascript:start()">start</a> | <a href="javascript:stop()">stop</a></p>-->



Open in new window

// JavaScript Document

//  variable to hold the current image number
var current = 1;

Open in new window

I am trying to create a dynamic form for the payment plan installments.

For example, the total is $700 and I have chosen 10 installments. so it will be $70 per   installment. Let say the client wan to pay 100 for the first installment so the first installment will be 100 and the rest is $66.67 and so on.Also the when making changes  it should only affect the row going forward.



JScript is Microsoft's dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer. JScript is implemented as an Active Scripting engine, so it can be "plugged in" to OLE Automation applications that support Active Scripting, such as Internet Explorer, Active Server Pages, and Windows Script Host. It also means such applications can use multiple Active Scripting languages, e.g., JScript, VBScript or PerlScript.

Related Topics

Top Experts In