Johar Ali has Published 58 Articles

What is $(document).ready() equivalent in JavaScript?

Johar Ali

Johar Ali

Updated on 13-Jun-2020 09:15:10

In jQuery, if you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded.$(document).ready(function() {    alert(“Document loaded successful!"); });ExampleIn JavaScript, to achieve the same ... Read More

What is the difference between Declaring and Initializing a variable in JavaScript?

Johar Ali

Johar Ali

Updated on 13-Jun-2020 08:39:29

The following is stated about declaration and initialization of a variable in ECMAScript specification −A var statement declares variables that are scoped to the running execution context’s VariableEnvironment. Var variables are created when their containing Lexical Environment is instantiated and are initialized to undefined when created. [...] A variable defined ... Read More

What is the purpose of new Boolean() in JavaScript?

Johar Ali

Johar Ali

Updated on 13-Jun-2020 08:21:10

The Boolean object represents two values, either "true" or "false". If value parameter is omitted or is 0, -0, null, false, NaN, undefined, or the empty string (""), the object has an initial value of false.The new Boolean() is used to create a new object. Use the following syntax to ... Read More

What are the differences between inline JavaScript and External file?

Johar Ali

Johar Ali

Updated on 13-Jun-2020 06:51:11

The following are the difference between inline JavaScript and external file −External scriptsThe browser stores the external script once it is downloaded for the first time. If it is to be referenced again, then no additional download is needed.This reduces download time and size.The async and defer attributes have an ... Read More

How does the browser identify inline JavaScripts?

Johar Ali

Johar Ali

Updated on 13-Jun-2020 06:44:28

Let’s say the following line we have in our HTML −Here the browser identifies inline JavaScript by detecting onclick, even when tag wasn’t available.The following are some of the suggestions for using inline JavaScripts −You should consider inline script elements such as ...) if the script only to be ... Read More

How to handle when JavaScript is turned off?

Johar Ali

Johar Ali

Updated on 13-Jun-2020 06:37:30

Nowadays, almost every web browser supports JavaScript. If it is turned off, you can use tag. To let users know about non-JavaScript web browsers, use the tag. The HTML tag is used to handle the browsers, which do recognize tag but do not support scripting. This ... Read More

Where should the Google Analytics Tracking Code be placed?

Johar Ali

Johar Ali

Updated on 13-Jun-2020 06:27:36

When integrating your website with Google Analytics, add the Tracking Code in your code. This will allow Google Analytics to track the page views and provide other analytics.Copy the code and place it just before closing tag i.e. in your website code. When you will integrate, the following ... Read More

Should I write my script in the body or the head of the HTML?

Johar Ali

Johar Ali

Updated on 13-Jun-2020 06:13:07

It is suggested that you should place the script within the tag or tag. It is good for performance to add JavaScript in element.ExampleHere is an example to add under … −                              

How to use external “.js” files in an HTML file?

Johar Ali

Johar Ali

Updated on 09-May-2020 10:43:45

Create external JavaScript file with the extension .js. After creating, add it to the HTML file in the script tag. The src attribute is used to include that external JavaScript file.If you have more than one external JavaScript file, then add it in the same web page to increase performance ... Read More

How to extract data from SAP using .NET provider.

Johar Ali

Johar Ali

Updated on 26-Feb-2020 10:18:56

To extract using SSIS, you need to have access to backend system. You can use .NET connector and write a Windows application that extracts data from SAP system using Function Module.For more details on how to connect SAP using .NET connector, you can refer this blog- https://blogs.sap.com/2013/02/14/connecting-to-sap-with-nco-3/With use of BAPI’s ... Read More

Advertisements