[Webinar] Streamline your web hosting managementRegister Today







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 want to use one Angular js for the front end and C# asp.net MVC and sql server for the back end.

how do you integrate or star development.

do you build your angular application first ? how to hook up the angular js and C# controller methods to post the data?  is there any best practices or how do developers do this in real applications?
Receive 1:1 tech help
LVL 11
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Not sure where to begin, I am using a CSV to Html table template by Derek Eder https://github.com/derekeder/csv-to-html-table.
Chris Stanyon pointed out that it appears to be using the DataTable plugin on a previous related question of mine
Is there a way to format the table so a if column 5 has CANCELED anywhere in it it makes the entire row black with white text
I don't have any experience in javascript as is apparent from my previous question so any help would be greatly appreciated.
Not sure where to begin, I am using a CSV to Html table template by Derek Eder https://github.com/derekeder/csv-to-html-table.
I'm using it to display a list of events that have happened, I would like to see if there is a way to make the default sort for the java app be reverse chronological order instead of chronological order. I know there are multiple sort functions, however since I am automatically refreshing every 10 seconds and it would be handy to have the results sorted the way I would like automatically.
I don't have any experience in java so any help would be greatly appreciated.
Finding really hard to hide the Cancel button, when the inner html gets displayed. How can I force the outer div to get the refresh? The last div section is not getting refreshed.


<div class="panel-group step-one" [class.hidden]= "(!isOtherOneTimePaymentSelected  &&( oneTimePaymentMethod?.id || show.oneTimePayment.stepTwo || (hasCreditCardMethod && hasBankPaymentMethod)))">
                <div class="panel" [class.expanded]="expand.oneTimePayment.card" [class.hidden]="expand.oneTimePayment.bank">
                    <div class="panel-heading" (click)="expandOneTimePayment('card')">
                        <h4 class="panel-title">Credit Card</h4>
                    <div class="panel-body">
                        <div class="panel-inner">
                            <add-card (saved)="createdOneTimePaymentMethod($event)"
                                      (canceled)="cancelExpand($event, 'card')"
                <hr class="panel-break visible-xs" />
                <div class="panel" [class.expanded]="expand.oneTimePayment.bank" [class.hidden]="expand.oneTimePayment.card">

Open in new window

I guess the question is:  Is there an HTML / Javascript solution to read/parse the contents of a text file and populate the web page accordingly

Here is what I'm trying to accomplish...

I want to read a text file & that has the following:


and so on

I want a simple HTML page to look like this:


I think I could do something  like this:

<a href="%%var_link1%%">%%Var_ReportName1%%</a><br />

<a href="%%var_link2%%"> %%Var_ReportName2%% </a><br />

<a href="%%var_link3%%"> %%Var_ReportName3%% </a>

  • Where
  • var_link
  • is the path name from the text file
  • Where ReportName is equal to the actual report name
I want to start learning Angular JS. Looking at the tutorials there are several different ways to set up the environment, which uses gulp, bower and many more
what is the simplest way to  get started with, to start learning this framework.
Hi Experts,

I've been using a JS export code that allows me to take data that is being passed from my dashboard and exported as a new excel file (xls).  The export function allows you to save the name of the file, and sheet name.  All this is great.  What I am needing help on is how can we programmatically save the exported file to a pre determined folder (network drive)?  I am not familiar with JavaScript so any assistance would be greatly appreciated.  

This is a request that will give executives the ability to click on a report used for certifying data and have to only hit "Certify" and the csv is placed in a network drive (folder) and the executives will never have to do anything other than hit the certify button. The problem with my code now is that it saves on the local machine as a default.


On Click of Refresh button in IE with https protocol , IE is opening a POSTDATA warning,
How do I reload a page without a POSTDATA warning in Javascript with JavaServer Faces?
I'm trying to figure out how I can scrap/detect if the phrase "We regret we cannot open the account you requested." is on the page using CSS Selector and/or Javascript (jQuery is ok if that is the only option but want to avoid it if possible?). Below is an excerpt from the mark-up.
<!-- current page: offers --> 
        <div class="main">
     <h3>Eligibility Results</h3><p>Thank you for your online application for an account at Bank of the West.  We regret we cannot open the account you requested.<br/>
If you would like to discuss this application with Bank of the West, please contact us at:</p>

Open in new window


I need to do some regular auto login with this website: https://max.eq-3.de/login.jsp The html below is not working for this website maybe because of the .jsp? Maybe I missed something, I tried some different scripts even PHP with cURL, but i never managed to paste any text in to the form fields?

function login() {
<BODY onLoad="login()">
<FORM NAME="maxRemoteLogin" METHOD="POST">
<INPUT TYPE="hidden" NAME="user" VALUE="xxx">
<INPUT TYPE="hidden" NAME="passwd" VALUE="yyy">

Open in new window

The new generation of project management tools
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

execFile(script, (error1, stdout1, stderr1) => {
                        if (error1 || stderr1) {
                            logger.error("+++++++++++" + error1  );
                        if (stdout1) {

Open in new window

when the script is log/getdata.bat
'log'is not recognized as an internal or external command, Pls suggest
Need to show or hide a DIV with Javascript based off of PHP string variable. Basically, I have a DIV with a lot of information and do not want to show it on the page, if the information supplier with the PHP script has not values. I am testing the value by setting a php variable and want to use javascript to see if there is a string in the php variable and if so, show the div. If the string is empty or blank, then hide the DIV.
I am using free jqgrid.  I have a row attribute based on a cell value that works fine when the grid is loaded, but when I do a reload, the attribute doesn't work.  any suggestions?
I'm working on a web site with a search box that shows the search results in an overlay with the original page unavailable in the background. I need to change the focus to the first link in the search results box so that visually impaired people using an OCR will hear or feel the brail of the first search result. (Currently the OCR continues to read from the page behind.)
The search uses www.googleapis.com/customsearch as the search engine.
After the search completes, one of the <div> tags gets an extra class: The <div> goes from :
<div class="gsc-results-wrapper-overlay" >
<div class="gsc-results-wrapper-overlay gsc-results-wrapper-visible">
That gsc-results-wrapper-visible class gets added to the div tag.
The page is created with SharePoint and so I don't want to mess with that unless there is no other choice. I want to do everything on the client side if possible.
My question is, how can I capture that div element when the search finishes. What DOM event would I react to? More generally, how can I discover these DOM events myself using developer tools?
I thought about something like this:
document.getElementsByClassName("gsc-results-wrapper-overlay").addEventListener("eventX", displayDate);
But even then I don't know what "eventX" would be.
The site is here:
I have a script that paginates pages in a table, which works fine. I also have a dropdown to select how many records to show in the table. Although this works, if I select say 20 records the pagination does not update to reflect the change.

When the table is run, the default records to show is 8 whih makes 9 pages. But if I select 20 in the drop down it still says 9 and if I go to page 9 it is obviously empty. I am also wondering if it is possible to have the script appear in both before and after the table. the reson for this is if a user gets to the bottom of say 100 records, then I would like this feature so they don't have to go all the way back to the top.

I would appreciate any help as my javascript is not 100%. Many thanks


    echo "<table class='paginated' cellspacing='0' cellpadding='0'>";
    echo "<div class='pager'></div>";
    echo "<thead><tr><th style='width: 5%;'>#</th><th>Service</th><th>Activity</th><th>Dept</th><th>Company</th><th>Address</th><th>User</th><th>Item</th><th>Date</th><th style='width: 19%;'>Action</th></tr></thead>";

    while($row = mysqli_fetch_array($result)){

    $id = $row['id'];
    $service = $row['service'];
    $activity = $row['activity'];
    $dept = $row['department'];
    $company = $row['company'];
    $address = $row['address'];
    $user = $row['user'];
    $box = $row['item'];
    $date = $row['date'];
    $date = date('d-m-Y h:i:s', strtotime($date));
    $edit = "<button type='button' class='btn

Open in new window

i have end dates that are stored in the database as: February 15, 2018 10:9:29

one is created from edge browser, one from chrome and one from FF. all of them are stored with the same string.
but all these browsers interpret the date differently. i attach the console images:
edge interpret all of them.
chrome and FF see the one that was created with edge as Invalid Date
also, FF interpret the date differently than chrome.

the aim is to delete the record if the date and time has past. so i have this:
let today = new Date();
console.log('today: ',today);
          data.forEach((data) => {

            if( new Date(data.enddate) < today  ){
              //delete automatically hangouts which are past due date
              console.log('in the past: ',new Date(data.enddate));
              console.log('not in the past: ',new Date(data.enddate));


Open in new window

the issue is that the deletion obviously does not work with the Invald date.

any idea?
from chromefrom edgefrom FF
Hi, Having an issue with setting div visible/hidden.
 On selection change of an option in a nested div, make the current <div> hidden and other <div> visible.
I am having an issue with this.  Whatever changes you do it's not hiding the other div.
The following is the plunker:


In the above Plunker, if I select an option, then it should hide the Production Type drop-down and show only Credit Card and Bank Account.
Hi I am trying to get my games to output the current time in seconds that the game is running for as a score for the player in the canvas but I keep getting an undefined var instead of the number?

Does anyone have any idea whats wrong with my code??

Thanks, See code below.

HTML5 Canvas
var Game = {
    canvas : undefined,
    ctx : undefined,
    backgroundImage : undefined,
    backgroundMusic :undefined,
    soundImage: undefined,
    soundImagePosition : { x : 750, y : 10 },
    vy : 0,
    rocket : undefined,
    rocketPosition : { x : 350, y : 400 },
    dxSpeed: 7,
	dySpeed: 3,
	keyboard : { keyDown : -1 },
	keys : {
    A: 65,     B: 66,      C: 67,      D: 68,       E: 69,      F: 70,
    G: 71,     H: 72,      I: 73,      J: 74,       K: 75,      L: 76,
    M: 77,     N: 78,      O: 79,      P: 80,       Q: 81,      R: 82,
    S: 83,     T: 84,      U: 85,      V: 86,       W: 87,      X: 88,
    Y: 89,     Z: 90, 	   LA:37,      UA:38, 	    RA:39,      DA:40,

function handleKeyDown(evt) {
    Game.keyboard.keyDown = evt.keyCode;

function handleKeyUp(evt) {
    Game.keyboard.keyDown = -1;

Game.start = function () {
    document.onkeydown = handleKeyDown;
    document.onkeyup = handleKeyUp;

    Game.canvas = document.getElementById("myCanvas");
    Game.ctx = Game.canvas.getContext("2d");

    Game.backgroundMusic = new Audio();
    Game.backgroundMusic.src = "assets/audio/start.mp3";

Open in new window

Never miss a deadline with monday.com
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Hi There,

I have a mongodb aggregate query in PHP that is throwing an error and I can't see what I've missed in the syntax.

Versions are
mongodb =  3.6
PHP  = 7.1
mongo PHP driver = 1.3.1-1

 The query in mongo shell works and looks like this:

			$match: {
			    download_Date : {'$gte' : 20180205 }
			$sort: {
			download_Date: 1 }
			$group: {
			 _id: "$cw_product_id", batch: { $last : "$download_Date" }

Open in new window

My code in PHP fails and  looks like

$command = new MongoDB\Driver\Command([
    'aggregate' => 'products',
    'pipeline' => [    
        ['$match' =>  [ 'download_Date' => ['$gte' => $batch ]]],
        ['$sort'  => [  
            'download_Date' => 1
    ['$group' => [ 
        '_id' => [ '$cw_product_id', 'batch' => ['$last' => '$download_Date'] ],
        'allowDiskUse' => true, 
        'cursor' => new stdClass, 

Open in new window

The error I receive when running the php script is

PHP Fatal error:  Uncaught MongoDB\Driver\Exception\RuntimeException: Unrecognized expression '$last'

Open in new window

I've pulled it apart and put it back together so many times, a fresh pair of eyes is needed to spot the obvious.  

Thanks in advance,

I have a text field where users enter whole numbers.  What I want to do is to automically add a decimal point and two zeros to the end of the number (ex: 123.00) when it is manually entered.  For some reason, it is too much work for users to simply add .00 manually.
Hi Experts, is it possible to download the file from outside the web directory? My web folder root directory is located at "C:\FolderWeb", while I want to download the file which is located at C:\Vb6\StopSkyWin.bat I'm using this <a href="C:\Vb6\StopSkyWin.bat" download>Visual basic 6</a> but it doesn't work. Any help, please!
Hi Guys,
I am returning JSON data from the server with ajax. When the data return it come like:

The issue I have here is the quotation in the beginning and the end. I do I remove these quotations. I have to take this data above and make it like a string.
I was trying many things like stringify, replace.
please see my code example:

function GetData() {
        var data;
            type: "GET",
            url: '/Tables/Getpaging',
            dataType: "json",
            async: false,
            //data: {},
            success: function (resp) {
                data = resp
        return data;

    var Dataobj = GetData().BindData;

function GetHeaders() {
        var headerName = "";
        for (var i = 0; i < Dataobj.length; i++) {
            if (i == 0) {
                for (var key in Dataobj[i]) {
                    headerName += "'" + key + "',";
            } else {
        var arr = "[" + headerName + "]";
        return arr;

Open in new window

Hi experts, I have found an inconsistency with the codes below getting the date using javascript. There are times in the day that the Date will go to advance sometimes months or years. I could not trace the problem because there is no specific time when it occurs. I wish experts could help me solving this problem. Thank you!


<!doctype html>
<html lang="en">
<body onload="GetDate()">
<div style="height:25px;">
 Date:&nbsp;<input type="Date" id="menuDate" class="posDate" readonly/>
 <button onclick="return mnuDate()">Date</button> 
 <input type="text" id="tDate">

function GetDate()
  var myDate = new Date();
  var myDateStr = myDate.getFullYear() + "-" + myDate.getMonth() + "-" + myDate.getDate();
  var nowDate = myDate.getFullYear() + "-" + myDate.getMonth() + "-" + myDate.getDate();
  var PosDate = myDate.getMonth() + "/" + myDate.getDate() + "/" + myDate.getFullYear();
  document.getElementById("menuDate").valueAsNumber = new Date(myDate.getFullYear(), myDate.getMonth(), myDate.getDate(), 12);


function mnuDate()
  var iDate = document.getElementById('menuDate').value;
  iDate = ((convertDate(iDate))); 
  document.getElementById('tDate').value = iDate;

function convertDate(arg)/*cd17*/
	var a=Date.parse(arg);
	var b=new Date(a);
	var day=b.getDate();
	var month=b.getMonth()+1;
	var year=b.getFullYear();
	var stringDate=month+'/'+day+'/'+year;

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.

Vendor Experts

Gil FeldmanMonday Learn more about Monday