October 26, 2018

Srikaanth

Lenovo JavaScript Most Frequently Asked Latest Interview Questions Answers

What are the goals of Ajax?

The basic goals of ASP.NET Ajax are:

Reduced web server hits
Reduced Network load
Interactive user interface
Platform and architecture neutrality
Support for both synchronous and asynchronous communication
Provide a server- and client-side framework

What is the difference between proxied and proxyless calls in AJAX?

Proxied calls are made through stub objects which can be called from PHP classes on the JavaScript side in AJAX.

Proxyless calls are made using utility JavaScript functions like HTML_AJAX.replace() and HTML_AJAX.append() in AJAX.
Lenovo JavaScript Most Frequently Asked Latest Interview Questions Answers
Lenovo JavaScript Most Frequently Asked Latest Interview Questions Answers

What are the protocols used by Ajax?

HTTP’s GET or POST
XMLHttpRequest for placing a request with the web server
Uses JSON to communicate between the client and server
UED or URL encoded data

What are all the security issues of Ajax?

Security issues that can be encountered

When Ajax calls are sent through plain text and it may lead to know the database details
Inserting scripts can also be possible and attackers can easily penetrate into the system

 How can we handle concurrent requests?

Javascript functions should be written to handle concurrent requests and call back function can be passed as a parameter. Those parameters are passed to AjaxInteraction(URL, callback) object.

Define the role of the Update Panel?

Update Panel is used to add functionality to the existing ASP.NET applications. By using partial page rendering, it can be used to update the content. Refresh can be made for the partial page instead of whole page.

Can we use nested update panel in Ajax?

Yes, we can use nested update panel in Ajax. Update panels can be nested to have more control over the Page Refresh.

What is the difference between firstChild and firstElementChild?

A firstChild when used returns the first node. It could be an HTML element or even a space, or a new line. Whereas, firstElementChild, when used returns the first HTML element only.

Name the two functions that are used to create an HTML element dynamically.

To generate an html element dynamically, we need to use two functions:

(i)    var ele = createElement ('elementName'), which creates an element and
(ii)   parentElement.appendChild(ele)

What is the difference between remove() and removeChild()?

The remove() function just removes the element. Whereas, the removeChild() returns the deleted element.

List out the Mouse Events.

There are altogether 9 mouse events. Here is the list:

1.    click: A single click

2.    dblclick: A double click

3.    mousedown: When the mouse button is clicked down.

4.    mouseup: When the mouse button is released up.

5.    mouseenter: When the mouse cursor enters an external element.

6.    mouseleave: When the mouse cursor leaves an external element.

7.    mouseover: When the mouse cursor enters an internal and external element.

8.    mouseout: When the mouse cursor leaves an internal and external element.

9.    mousemove: When the mouse cursor is moved.

What is the use of history object?

By using the history object you can change or switch back to history pages or forward from current page to another page.

What is an Event Bubbling in Javascript?

When an event is fired on an HTML element, the execution starts from that event and goes to its parent element. From there, the execution passes to its parent element and so on till the body element.

What does window.print() do in Javascript?

The print() function from window object prints the current web page when executed.

How can a Javascript code redirect the user to a different page?

The window.location is assigned a value; i.e., a web link. On its execution, the Javascript code can redirect the user to the mentioned web link.

What are Cookies in Javascript?

A Cookie is a variable that is stored on a client's/visitors machine. Using Cookies, the servers can identify the client and the client's transactions.

How do Javascript primitive/object types passed in functions?

Primitive types in Javascript are passed by value; whereas, object types are passed by reference.

What is NaN in Javascript?

NaN is a short form of Not a Number. When a string or something else is being converted into a number and that cannot be done, then we get to see NaN. A strange thing about NaN is that it is not equal to anything including itself.

List out all the falsifying tokens in Javascript.

There are 6 tokens that falsify in Javascript and they are false, null, undefined, 0, NaN.


Subscribe to get more Posts :