[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More



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.

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

Sign up to Post

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

Rowby Goren Makes an Impact on Screen and Online
LVL 12
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

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?

Exploring ASP.NET Core: Fundamentals
LVL 12
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

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.


I need to work out some maths using javascript and html.

I need to just use core js and html not any libraries

I need to take £3 and times that by 2 every day for 30 days and then have it output in HTML in a list  like so :

day 1 = £3
day 2 = £6
day 3 = £12
day 4 = £24
and so on...

I'm very new to js so if anyone could show me some example code that could accomplish this task I would be very grateful. Thanks.
OWASP Proactive Controls
LVL 12
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

Hi experts,

am trying to append array . but it's not working the .Please see the below code


jans: function () {
                var arraylist = [];
                if (arraylist.length == 0) {
                           id: $('#idHolder').text(),
                           a: this.answercount(),
                           elapsed: 20
                } else {
                        id: $('#idHolder').text(),
                        a: this.answercount(),
                        elapsed: 20

                return arraylist;


please correct me if am wrong

thanks experts

console.info("Page Title: " + document.title);

// Contact page heading
let ContactMe = document.getElementById("ContactMe");
let myHeading="Contact Me";

let name = document.getElementById("name");
let email = document.getElementById("email");
let mobile = document.getElementById("phone no.");
let message = document.getElementById("message");
let submit = document.getElementById("submit");


alert("Information saved");


I am working on developing a way to receive emails to a specific contact (or queue) to archive emails related to a contact.  These are not necessarily emails being tracked within CRM 2016.  The contact receiving an email may not have an email address in which case the email should go to a global contact with information from the email.

I have this as a returned value from SQL to JavaScript


(In SQL it's 2017-01-30 00:00:00.000)

How do I convert this to 01-30-2017 in JavaScript?
Hi i need to load a responsive slider which contains image & data from external xls / xml file. How can i make the info in the file display in the slider in html. Can anybody please help me with the code / links?
Is there a regex, or vbscript way to reverse a filename?
I know some standalone file-renamers can do that, but I prefer a regex or vbscript, so I can include that in my file manager.

So, like:
fm: 54321 yaw desrever a ni deyalpsid saw emanelif siht yllanigirO.txt
to: Originally this filename was displayed in a reversed way 12345.txt



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

No Top Experts for this time period. Answer questions to earn the title!