21⟩ In a pop-up browser window, how do you refer to the main browser window that opened it?
Use window.opener to refer to the main window from pop-ups.
“Expert JavaScript Developer Frequently Asked Questions in various Expert JavaScript Developer job Interviews by interviewer. The set of questions here ensures that you offer a perfect answer posed to you. So get preparation for your new job hunting”
Use window.opener to refer to the main window from pop-ups.
Return true if the argument is not a number.
GET: Parameters are passed in the query string. Maximum amount of data that can be sent via the GET method is limited to about 2kb.
POST: Parameters are passed in the request body. There is no limit to the amount of data that can be transferred using POST. However, there are limits on the maximum amount of data that can be transferred in one name/value pair.
All variables are of object type in JavaScript.
In order to detect the operating system on the client machine, the navigator.appVersion string (property) should be used.
Boolean operators in JavaScript are as under
&&, || and !
RegisterClientScriptBlock emits the JavaScript just after the opening tag. RegisterStartupScript emits the JavaScript at the bottom of the ASP. NET page just before the closing tag.
1. To remove an item from a list set it to null
mySelectObject.options[3] = null
2. To truncate a list set its length to the maximum size you desire
mySelectObject.length = 2
3. To delete all options in a select object set the length to 0.
mySelectObject.leng
JavaScript code can be embedded in a web page between
<script langugage="javascript">
//Place Your JavaScript here.
</script>
tags
Yes. Since JavaScript is a client-side script it does require the web server's help for its
computation, so it is always faster than any server-side script like ASP, PHP, etc..
It is true, text you last copied for pasting (copy & paste) can be stolen when you visit web sites using a combination of JavaScript and ASP (or PHP, or CGI) to write your possible sensitive data to a database on another server.
No. java and JavaScript are two different languages.
Java is a powerful object - oriented programming language like C++, C whereas JavaScript is a client-side scripting language with some limitations.
The "Access Denied" error in any browser is due to the following reason.
A JavaScript in one window or frame is tries to access another window or frame whose
document's domain is different from the document containing the script.
Setting the focus in an element using JavaScript:
<script>
function setFocus() {
if(focusElement != null)
{
document.forms[0].elements["myelementname"].focus();
}
}
</script>
Since 1 is a string, everything is a string, so the result is 124.
An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel.
Determining the state of a checkbox in JavaScript
var checkedP = window.document.getElementById("myCheckBox").checked;
Web-garden - An IIS6.0 feature where you can configure an application pool as a web-garden and also specify the number of worker processes for that pool. It can help improve performance in some cases.
Web-farm - a general term referring to a cluster of physically separate machines, each running a web-server for scalability and performance (contrast this with web-garden which refers to multiple processes on one single physical machine).
A prompt box allows the user to enter input by providing a text box.
Use the "value" property.
var myValue = window.document.getElementById("MyTextBox").value;