JavaScript

121K

Solutions

42K

Contributors

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

Is there a way to monitor and then kill a server request for an image (preferably in JavaScript) if it is taking too long? The image comes from a 3rd party server so I'd have to kill it on the request side. I'm asking due to us firing 3rd party marketing pixels on our web app. Sometimes they take extreme amounts of time to respond.
0
Big Business Goals? Which KPIs Will Help You
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Hi,
I have 3 apps that are operating within ms/access (split beck end) and need to (i) integrate them in a single unique app and (ii) migrate to a web-based environment (i.e. accessible through a browser)  or client/server with the database on the back-end. I recognise that I really must quit ms/access as its restrictions on the GUI are starting to really show and its cracking all over (e..g. it launches explorer to accede to a dynamic net page to show GIS stuff, but the inverse path (from explorer back to ms/access is, simply, impossible).

The back-end database is open but I am able to use any common databases, ODBC databases as I will limit both the field types and the functions, but I need to process images (I have been doing it with bought controls).

My first idea is to go with NetBeans or IntelliJ or Azure but I am terribly hesitating. If its desktop based, the final app needs to run on many platforms or then be web-based. Running on IOS/Android would also be a requirement.

can anyone help?

(in total I gave roughly 300 forms and 150 reports and about 450 columns... (not counting roughly 200 queries over 150 tables).

Can anyone help to coach me on a convenient path?

all hints will be cheerfully accepted

joao

PS I am able to pay for a licensed platform. My current MS/Access "bloat" came from the extraordinary EE sopport...
0
I need help writing a Javascript function which will take a string as an arugment and then filter out an array of strings starting with the string I pass as an argument.
So if I have the following array:
let words = ['simple', 'single', 'side', 'sacked', 'apple', 'orange']
I need a javascript funtion that will look at every string in this array, and give me a second array called myFilteredWords which start with the letters 'si" - assumuming that I pass 'si" as an argument to the funtion.
0
2016 clustered environment . Nodes A crashed after a Ms path so it was rebuilt from an image of node B. I did make sure my ip's are correct.  Now im not able to Ping the private Network. Able to Ping one way only. Can ping from no B to node a. Cannot ping from node a two node be. This is after a crash where I had to rebuild node a from an image of node be. I have reset all settings but this one still has me confused any ideas.
Pings x.x.0.2 on nobe b to node a x.x.0.3 works.
Not working
Ping x.x.0.3  to x.x.0.2
Even isolated ping by typing.
Ping X.x.0.3 -S x.x.0.2
Still not pinging private network (heartbeat)
0
Hi,

In node red, while i insert the - timestamp datatype its work perfectly. while try to select data with the time stamp, its display different time.

Data insert in mariadb ----> 2018-09-19 23:47:26

While select data
if (Device > 0)
    msg.topic ="Select DeviceId, Line, outPIN, count,Time FROM mytab LIMIT 1";

return msg;

Open in new window


While try pull data out of mariadb the data timestamp show --> 2018-09-19 00:20:00
0
Trying to display the day of the week in the Philippines on my website no matter where the user is located. I am in the USA, no idea where the server is. below code only returns the browsers local day:
<script>
        var weekArray = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
        var week = weekArray[new Date().getDay()]
        document.write(week);
    </script>
0
Hello Experts,

This issue is concerning an ASP.NET webpage that's currently used in our contact center.
It's a personalized launch page for users, with links they need to do their jobs.
But recently some of the tools used by our colleagues have changed.

The problem is, some links now work faster in IE and some faster in chrome.
And the difference in speed is rather dramatic in some cases.

I need a way to force the individual links to open in the fastest browser.

Many Thanks!
Maurice
0
does google webmaster tools require javascript on every website page for tracking

where is javascript code in google webmaster tools
0
Hi Experts,
I am working on a MVC.Net application with C#.Net code-behind.

I am using an Array in one of my views.
I am able to populate my array just fine, but I need to do the following once I have populated my array:
1. Group by the following fields: order, item, description
2. Sort by the following fields: order, item, description

I have included my javascript code below.  
Please show me how to do my grouping and sorting of my javascript array.

var claimsHeader = new Array(); 



function onDataBoundHeader(arg) {
	var dataItemsHeader = arg.sender.dataSource.view();

        for (var j = 0; j < dataItemsHeader.length; j++) {
            var order = dataItemsHeader[j].get("Item");
            var item = dataItemsHeader[j].get("Market");
            var description = dataItemsHeader[j].get("Description");
            
            var claims = new Array(order, item, description);
            claimsHeader.push(claims);
        }
}

Open in new window


Thank you in advance,
mrotor
0
Hello All,

We are having issue while fetching values related to dropdown.
Example: We have first Country dropdown and based on that we need to fetch value for State dropdown. But State values are not getting fetched.

So we have code 'OnChange ' property of Country dropdown.

we have a java script mentioned on form where we are defining variable say
V3 = 'computedtext' here computed text holds lotus notes formula of 'dbcolumn' which fetches value of country
V4 = 'computed text' here computed text holds lotus notes formula of dbcolumn which fetches value of states

But while loading form in web browser.. it is throwing error V3 is not defined.. where as V3 is already defined on the form.

Please suggest
Thanks
0
Exploring SharePoint 2016
LVL 12
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Talking to several people, it seems jquery has started to become a little less popular. I am curious if there is a technical reason for this, or if it is more of a it is just a little less popular?  Thoughts?
0
Hello Experts,
I have a Onclick event attached to button which should open a window (on Javascript), which is working just fine.  But, when I click on another URL same window opens up, which is not related to the URL at all.  Any idea what could be going on?  Please try to help.  Thank you in advance.

Note:  Due to company's restrictions I will not be able to post the code here.

Thank you!
0
I am using the script below to verify that the user enters the correct information on a registration page. Everything works FINE per individual field, and it displays an error message if there was an error entering the field information. The problem is that there are 5 different INPUT FIELDS, and the user might enter 3 correct and 2 incorrect, BUT IF THE USER GOES BACK AND CORRECT 1 FIELD (OF THE PREVIOUSLY 2 INCORRECT), and then submit the form THE FORM IS SUBMITTED WITH 1 FIELD ERROR.  How can I solve this issue NOT TO BE ABLE TO SUBMIT FORM IF AN ERROR ON FORM

Tnx, I have been trying to figure this for 5 days already :-(
I thought of a hidden field with value 0 for correct or 1 for incorrect, but that wouldn't solve the problem according to my previous example

I am using HTML and an external PHP to verify values

<script type="text/javascript">
    function ajaxFunction(disp_div) {
        var httpxml;
        try {
            // Firefox, Opera 8.0+, Safari
            httpxml = new XMLHttpRequest();
        } catch (e) {
            // Internet Explorer
            try {
                httpxml = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    httpxml = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {
                    alert("Your browser does not support AJAX!");
                    return false;
                }
            }
        }

        function stateChanged() {
    

Open in new window

0
I am using Fabric.js. I have next canvas:
 <canvas class="objectcanvas" id="c" width="1060" height="550" style="display:none;"  >  

Open in new window


and then I make canvas to become visible  when someVariable  is set:
function OnSomeCase() {
     if  (someVariable !== ""  ) {
   document.getElementById("c").style.display = "block";
   }

Once canvas is visible, if I click on canvas:
canvas.on('mouse:down', function(e) {
console.log("eeeeeeeee2");
 }

Open in new window

code does not write anything in console.


If my canvas is visible from the start:
 <canvas class="objectcanvas" id="c" width="1060" height="550"  >  

Open in new window

mouse event fires and console displays "eeeeeeeee2".

What must I do to make canvas events to be alive in first case also?
0
I am looping within a radio group, getting the selected radio and then using it's order to get the data from a listbox, so if the selected radio is number 5 then  textbox1 must contain item 5 of the listbox1, here is my code (which is not working)

<script>
    function myFunction() {
        var AllListItems = document.getElementById("ListBox1");
        var WantedRadio = document.getElementsByName("CheckedRadio");
        var RadioGroupLength = WantedRadio .length;
       
        for (var i = 0; i < RadioGroupLength ; i++) {        
            if (WantedRadio[i].type == 'radio' && WantedRadio[i].checked == true)
                document.getElementById("TextBox1").value = inputfields[i].value;  //this line works fine
                document.getElementById("TextBox1").value = AllListItems.options[i].value;  //this line does not work

    }
}    
</script>
0
I am using Google Maps API version 2.

I need to cusztomize the Google map zoom effect as in this below video:
https://drive.google.com/file/d/1LmnzVmzxVxpjcU2fuQUYUboiglW0yi_r/view?usp=sharing

Open in new window


Any help will be greatly appreciated.

Note: The zoom effect will be visible when user selects a country name from a select box.

Thanks
0
Any Recommendations on where to look to re order a list based on input, i have a list that has switches and what i am trying to do is some filtering to display checked switches

$("#check-sort-list").on('change', function() {
       var get_selected = $(this).val();
        
        alert(get_selected);
        
        if(get_selected == 1)
            {
                console.log(get_selected);
            }
        
        else if(get_selected == 2)
            {
                console.log(get_selected);
            }
        
        else if(get_selected == 3)
            {
                console.log(get_selected);
            } else 
                {console.log("No selection");}
    });

Open in new window



my list is just a normal html list with a label and a checkbox.
0
Hi I am selecting data from mysql database in node red: -

my database value are as follows:-
dbtime.png
Code in node red as follows: -
 msg.topic ="Select DeviceId, Line, outPIN, count,Time FROM mytab LIMIT 1"

Open in new window


In debug node i do get the time in different format and unable to store in different location of database.

9/17/2018, 4:59:29 PMnode: 4f250b1.97196f4
INSERT INTO mytable1 (DeviceId,Line,outPIN,count,Time) VALUES (?,?,?,?,?) : msg.payload : array[5]
[ 2, 1, "7", 1, "2018-09-16T13:28:24.000Z" ]
9/17/2018, 4:59:29 PMnode: d00874f1.76f388
msg : error
"Error: ER_TRUNCATED_WRONG_VALUE: Incorrect datetime value: '2018-09-16T13:28:24.000Z' for column 'Time' at row 1"

Open in new window



How i can format the time back to normal 'yyyy-mm-dd hh:mm:ss'
0
I am trying to send a text message (SMS) using email by using the telephone number, and the carrier specific suffix. For example, to send to a Boost Mobile customer, you would simply send an email to: 8135551212@myboostmobile.com - and it will send a text message to that number. Each carrier has its own suffix.

I have a list of carrier information:

Carrier            SMS gateway domain      
Alltel            [insert 10-digit number]@message.alltel.com      
AT&T            [insert 10-digit number]@txt.att.net      
Boost Mobile      [insert 10-digit number]@myboostmobile.com      
Cricket       [insert 10-digit number]@mms.cricketwireless.net
Project Fi      [insert 10-digit number]@msg.fi.google.com
Sprint            [insert 10-digit number]@messaging.sprintpcs.com      
T-Mobile      [insert 10-digit number]@tmomail.net      
U.S. Cellular      [insert 10-digit number]@email.uscc.net      
Verizon            [insert 10-digit number]@vtext.com      
Virgin Mobile      [insert 10-digit number]@vmobl.com      
Republic Wireless[insert 10-digital number]@text.republicwireless.com


Our C# driven site already has code set up to send an email.  We call the c# controller from Javascript like this:

var objToSend = {
     Email: "john@gmail.com",
     Body: "This is the body of the email",
     Subject: "Hello from our site."
}

// Call controller to send the email
$.post('/Contact/NotifyAdmin', objToSend);

Open in new window


So what I want to do is, re-use our existing code to send a text message.

Assuming I have the carrier and phone number available to me, how would I use our existing code?

var phoneNumber = "8135551200";
var carrier = "Verizon";

// Somehow I need to "build" the phone number in its correct format and pass as the "Email" property

// Then.. call our controller as normal

Open in new window


I think this is an ARRAY problem, isn't it? Can anyone help me get me going?

Thank you for looking.

Regards,

John
0
Determine the Perfect Price for Your IT Services
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

I have a regular html page with some JavaScript on a button click event.

This is my current code on my page:

<!DOCTYPE html>
<html>
<head>
	<title>Test Page</title>    
    <style type="text/css">
        body {
            padding: 30px;
            font-family: Arial;
        }
    </style>
   <script type="text/javascript">
                  
       function TestFunction() {

           // fiscalstartvar is 07/01/FiscalYear-1
           // fiscalendvar is 06/30/FiscalYear

           // save value of fiscalyear hidden field in variabl
           var fiscalyearvar = 2019;
           var vartodaysdate = "09/16/2018";
           var fiscalyearminusonevar = fiscalyearvar - 1;
           var fiscalstartvar = "07/01/" + fiscalyearminusonevar;
           var fiscalendvar = "06/30/" + fiscalyearvar;

           if (fiscalstartvar <= vartodaysdate && fiscalendvar >= vartodaysdate) {
               var iscurrentfiscalyearvar = "true";
           }
           else {
               var iscurrentfiscalyearvar = "false";
           }
           // display on div
           document.getElementById("DivIsCurrentFiscalYearVar").innerHTML = iscurrentfiscalyearvar;
       }       
    </script>
</head>
<body>
    <input id="Button1" type="button" value="Button1" onclick="TestFunction();"/>  
    <br /> 
    <Div id="DivIsCurrentFiscalYearVar"></Div>
</body>
</html>

Open in new window



When I click the button, In the if statement this, variable iscurrentfiscalyearvar  currently returns "false"
but when FiscalYear is 2019 it should return true.

I think i need  my issue is in this line.
if (fiscalstartvar <= vartodaysdate && fiscalendvar >= vartodaysdate) {

Since those variables hold strings that are dates in order to do a less than equal to comparison do i have to convert them to datetype somehow.
Anyone know the syntax or how I fix my example?
0
Problem:

Encountering Reference Error/.JS file unable to load. The goal is to have input from the user displayed in another text field.  Then reset the first input field so that new info can be put in. The code is 97% complete with all HTML requirements including methods and variables in the .js file. The code is in vanilla javascript and HTML. Located below and saved as a .txt for upload compatibility to the site.

Attempted solutions: Initializing the anonymous function to a variable did not work. Looking for a solution ASAP. Plugins/extra frameworks/Jquery cannot be used.
THECURRENTASSIGN1CODE91518.txt
0
miss kyle santos  main appko apni native bhasha main sawaal karta hoon jiska mujhe jaldi she jaldi samadhaan chahiye sawaal yeh hai ki main aapni email I'd ya mobile number pe java ya java script chalana chahta hoon MATLAB confirm karna chahta hoon waise mujhe java ya java scrip aati nahin hai yani mujhe maloom nahi ki java ya java script kya hota hai air mujhe java programing bhi nahi aati hai main bad itna chahta hoon ki main aapne system she kuch alag karke dekhu is me mujhe romanch hota hai isliye main chahta hoon ki main aapne cell phone number ya email I'd dwara jaisa bhi sambhav ho sake main videos aur anaye samagri download maroon Jo ki play bhi ho sake air main unhe play kar saku MATLAB ki java ya java script she videos download karon iske alawa doosri baat ki kye aaise files hain Jo mere mobile system me java ya java documents gain Jo download ho chuke gain Jo ki play nahin ho rahe play karne par in files ko mera system support nahin karts hai Jai's ki mera system main zop ,jpj,png,axp,docx,xisx,PDF aur bhi kayen tarah ki files gain Jo ki mera system ko support nahin karti aap mujhe is ka much tarika sujheye ki main in files ko kaise play karoon aur jaldi se mere is sawaal ko sahi kijiye mera yahi mat hai thank you
0
Spring Boot and Angular: Serving static content

Hi Experts,

I have a springboot backend application and an angular front end. I have built the angular front-end copied the contents of dist directory to /src/main/resource/static.  The index.html in the static directory is served when I go to https://localhost:8443 and the links are working.  However, when I refresh the page, it goes to the whitelabel error page.  I have found a proposed solution to this from StackOverflow.  It too doesn't work.
@Controller
public class ForwardController {

    @RequestMapping(value = "/**/{[path:[^\\.]*}")
    public String redirect() {
        // Forward to home page so that route is preserved.
        return "forward:/";
    }
} 

Open in new window

However, using this just prints forward:/ on the refreshed browser.   Also, this too does not look like the solution I want.  I want to just refresh the page.
Any help would be appreciated.  Thank you
0
How to have textbox regular expression validation on asp.net?


I will have to allow 3 digits and units in the text box. Decimal units should not exceed more than 2 units.

How to handle that?
0
hi,

The following is an example of network graph from a fusion table:

http://enex.net/autorecon/fusion/GC_network.html

How can i listen for a click event and then return the name of the node that has been clicked?

I'm a novice here so please bear with me.

I notice that once the page has loaded, it's possible to click and drag nodes around even without an internet connection, so all the data is pre-loaded to the browser.

The following might give some clues: https://developers.google.com/fusiontables/docs/samples/change_infowindow_content

Thanks
0

JavaScript

121K

Solutions

42K

Contributors

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.