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

x

JScript

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

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() {
                  room++;
                  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>';
                  
                  objTo.appendChild(divtest)
                  
            }
            
      </script>

<script language="VBScript">
      Option Explicit

      Sub ProcessInfo_OnClick
      
       End Sub
</script>
Thank you
0
Python 3 Fundamentals
LVL 12
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

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">
                                <dt>Product</dt>
                                <dd class="offer-product-label">Line of Credit</dd>
                            </dl>
                            <dl tabindex="0">
                                <dt>Amount Requested</dt>
                                <dd class="offer-product-label">$45,000.00</dd>
                            </dl>

                        </fieldset>

Open in new window



Thanks!
0
We have a Dynamics 365 8.2.2.112 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.

//<html><head>
//<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."
	        alert(msg);
	        return;
	    }
	    //var serverAndOrgUrl = getServerUrl();
	    //alert(serverAndOrgUrl);
	    var clientUrl = Xrm.Page.context.getClientUrl();
	    alert(clientUrl);
	    debugger;
	    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

0
I am new to react js. I am working on a sorting function. Below is my code. When it run the line of :   manList:  newManList.sort( (a, b) => (, I got an error that : The sort method cannot be invoked on an Immutable data structure.  How can I make the newManList variable as a mutable data structure?

Thanks


isHeaderClickable(key){
    let newManList = this.props.mans;
    this.setState({
        manList:  newManList.sort( (a, b) => (
            this.state.direction[key] === 'asc'
                //? parseFloat(a[key]) - parseFloat(b[key])
               // : parseFloat(b[key]) - parseFloat(a[key])
                ? (a[key]) - (b[key])
                : (b[key]) - (a[key])
               )),
        direction: {
            [key]: this.state.direction[key] === 'asc' ? 'desc' : 'asc'
        }

    })

    },
0
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?
0
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
0
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>
        </select>
     </div>
       
     <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">    
      </div>  
     </div>
    </div>
0
We are running Dynamics 365, version 8.2.2.112, 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?

Thanks
0
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.
0
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.

Test.html
Untitled-3.php
Untitled-2.js
0
Starting with Angular 5
LVL 12
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Hi,

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


<!DOCTYPE html>
<html lang="fr">
  <head>
    <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>
    <style>
       #map {
        height: 600px;
        width: 90%;
       }
    </style>
  </head>
  <body>
    <div class="container-fluid bg-2 text-center">
      <h1 class="margin">Des Marqueurs Google Maps</h1>
    </div>
    <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>
          </button>
          <a class="navbar-brand" href="https://developers.google.com/maps/documentation/javascript/adding-a-google-map?hl=fr">My Google Maps</a>
        </div>
        <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

0
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?

thanks!
0
Oh men,
Im wondering if you guys can give me some advice and examples of how i can position my web page in the proper manner,
some tricks or best practices for positioning my page locally
regards
0
I think I read WHY this is happening but not sure how to fix it. If you visit

http://www.day6management.com/

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.
0
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);
    }).trigger('resize');

        $DocumentData.jqGrid({
            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', …
0
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?

Thanks
0
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"
cn.Open
   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, "'","''") & "')")
				            cn.close
				            set cn = nothing
	                     response.write("Saved!")  
                        Response.End()
               Else
                        Response.End()
               end if
           End with
   Set rs = nothing
   cn.close
%>

Open in new window

0
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!
0
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 :

jquery
$(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
    $('#end').css({
            "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

0
HTML5 and CSS3 Fundamentals
LVL 12
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Hi,

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 ;

HTML

<!DOCTYPE html>
<head>

<title>Slide Show </title>

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

</head>

<body onresize="rescale();">


<div id="main">

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


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

<p>
	<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> 

</p>
<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>-->

</div>

</body>
</html>

Open in new window


Javascript
// JavaScript Document

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

Open in new window

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

http://jsfiddle.net/uxmm2gta/6/
0
Hi,

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.
0
I tried to create a count down clock in Dreamweaver.  I need to remove the script I entered, but unsure of how to do it.  Help, please.
0
Hi experts,

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

[code]


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

                return arraylist;
              }

[/code]

please correct me if am wrong

thanks experts
0
case"Contact":

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

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

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");

submit.addEventListener("click",function(display){

alert("Information saved");
display.preventDefault();

console.log(name.textContent("name"));
console.log(email.textContent);
console.log(mobile.textContent);
console.log(message.textContent);

},false);
0

JScript

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
JScript
<
Monthly
>

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