Rahul Sharma has Published 46 Articles

What happens if we re-declare a variable in JavaScript?

Rahul Sharma

Rahul Sharma

Updated on 13-Jun-2020 08:40:34

114 Views

On re-declaring a variable in JavaScript, the variable value still remains the same.ExampleLet’s see an example. Here, we are declaring the variable age −                              

How to write inline JavaScript code in HTML page?

Rahul Sharma

Rahul Sharma

Updated on 13-Jun-2020 07:08:11

533 Views

Inline JavaScript Code − If you are adding some JavaScript code in an HTML file without using the src tag then it is known as inline JavaScript code. That’s all you need to know.

How to use the same JavaScript in multiple content pages?

Rahul Sharma

Rahul Sharma

Updated on 13-Jun-2020 06:45:08

1K+ Views

To use the same JavaScript in more than one page, add the js code in an external JavaScript file. Let’s say the following demo.js is our external JavaScript file −function display() {    alert("Hello World!"); }Now add the external JavaScript file to the following HTML web page. In the same ... Read More

How to disable resizable property of textarea using JavaScript?

Rahul Sharma

Rahul Sharma

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

145 Views

To disable resizable property, use CSS style −textarea {    resize: none; }To disable specific textarea with different attribute values, try the following. Let’s say the attribute is set to “demo” −textarea[name=demo] {    resize: none; }Let’s say the id attribute is “demo” −For the above,#demo {    resize: none; }

How to declare variables in JavaScript?

Rahul Sharma

Rahul Sharma

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

841 Views

Like many other programming languages, JavaScript has variables. Variables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container.Before you use a variable in a JavaScript program, you must declare it. Variables are declared with ... Read More

What is the difference between anonymous and inline functions in JavaScript?

Rahul Sharma

Rahul Sharma

Updated on 13-Jun-2020 06:18:52

2K+ Views

Anonymous FunctionsAnonymous, as the name suggests, allows creating a function without any names identifier. It can be used as an argument to other functions. This is how JavaScript anonymous functions can be used −var myfunc = function() {    alert(‘This is anonymous'); }Another example can be the following −setTimeout(function() { ... Read More

Why prefer to put JavaScript in the footer of an HTML page?

Rahul Sharma

Rahul Sharma

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

752 Views

With JavaScript, you can put JavaScript anywhere on the page, whether inside or tag. But, it is a good practice to add JavaScript in the footer i.e. just before closing the tag. This is because −It loads script faster.It will not block any DOM content to load.It ... Read More

User rights required to make a call to SAP RFC Function Module RFC_SYSTEM_INFO from JAVA application

Rahul Sharma

Rahul Sharma

Updated on 25-Feb-2020 11:12:21

564 Views

When you use Java connector you need basic authorization to read metadata of Function Module. S_RFC is an authorization object for the RFC call.This object contains the following fieldsRFC_TYPE Type of the RFC object you want to protect. You can pass the value 'FUGR'- function group) or 'FUNC'- function module.RFC_NAME ... Read More

Present date as default value in a table

Rahul Sharma

Rahul Sharma

Updated on 25-Feb-2020 11:07:58

152 Views

Please try the below code. Note that you need to set the value before START-OF_SELECTIONselect-OPTIONS: so_date FOR sy-datlo. INITIALIZATION. so_date-sign = 'I'. so_date-option = 'EQ'. so_date-low = sy-datum. CLEAR so_date-high. APPEND so_date.You can also try this easy option −select-OPTIONS: so_date FOR sy-datlo default SY-DATUM.Read More

Accessing element which is defined SAPUI5 application

Rahul Sharma

Rahul Sharma

Updated on 25-Feb-2020 10:56:56

60 Views

You could try using the below code −var iconTabBar = sap.ui.getCore().byId("vwDetails--itabBar")

Advertisements