Home  |  About  | Last |  Submit  |  Contact
AllQuests.com

Previous Question:  F S Blackberry curve 8300  Marketplace ArchiveNext Question:  Feeler Knomo Lydnon Messenger Bag for 15 MBPs  Marketplace Archive
Question Java Script Interview Questions ( SitePoint Forums JavaScript )
Updated: 2008-11-23 07:15:02 (15)
Java Script Interview Questions

Java Script Interview Questions

few important javascript inteview question
if you know the answer do post them
it would be very helpful

1.JavaScript and JScript?
How and in what ways does JavaScript differ from JScript?

2.Redirecting a page
How to redirect a page using JavaScript

3.Implement Timer Control
How to implement timer control in JavaScript

4.Java swing
why is java swing so efficiently used in most graphics programming and not effected by systems graphic properties?

5.Differenece between @Posted commands and @commands

6.How do you call function in javascript?

7.How do you get field value in javascript?

8.How do you check validations in javascript?

9.Difference between computed field and Computed for display?

10.How do you restrict user not to copy web page in Java Script ?

11.Script to check every character
Write a code to get the text box data and to check each and every char?

12.How will you insert data into db2 using JavaScript?

13.What is flapjax and what are its benefits compared to javascript . How it converts flapjax code to javascript

14.How to validate a Email-address, in Form using JavaScript?

15.What is the difference between java and java script?

16.How to prevent a window not to be clicked or selected any way in java script?

17.What are the methods of validating whether the form is secure?

18.Write sample code for pagination using java script.

19.What is javascript and what is it functionality?

20.What is the main difference between Client side JavaScript and and Server side Java Script. How actually

21.Explain about session? Where it runs & what are different types of session handling?

22.How to add a combo box dynamically at run time in Java script?

23.How to go next field without filling the text? Which function should use.Phone No Text validation in

24.How to use email validation in Java script.Like User can't enter invalid email address?

Answers: Java Script Interview Questions ( SitePoint Forums JavaScript )
Java Script Interview Questions

Yes, it returns true for my email address :-)

In truth, no email validation is complete. The large one above allows all of the proper characters that can be allowed in email addresses, but it doesn't check top-level domains properly. It can help to have several regular expressions that the email address filters through, each designed to perform separate tasks depending on how careful you want to be.

pmw57

Java Script Interview Questions

does that email validation really works, have anyone tested it?

divinequran

Java Script Interview Questions

A former colleague of mine got asked that question about validating a form. He went on to say that javascript validation is much better than server side because it's faster...

He got the job.

joazito

Java Script Interview Questions

That all depends on how you define "better". I would agree that javascript validation is better than server-side validation when it comes to speed.

However, server-side validation should be maintained to prevent those naughty script-kiddies from submitting unvalidated data, and them russian mafia people too.

pmw57

Java Script Interview Questions

Quote:
Originally Posted by joazito
He got the job.
and they got the candidate they deserved

r937

Java Script Interview Questions

Is it that time of year again already?

Regular as clockwork are these posts.

siteguru

Java Script Interview Questions

Quote:
Originally Posted by joazito
He got the job.
He shouldn't have.

Saying that client-side validation is "better" than server-side solely because of its speed is just stupid and frankly shows your friends ignorance more than anything else.

JimmyP

Java Script Interview Questions

Quote:
Originally Posted by pmw57
However, server-side validation should be maintained to prevent those naughty script-kiddies from submitting unvalidated data, and them russian mafia people too.
Damn the Mafia! They're always looking to submit unvalidated data, what a cheeky little operation they've got going there!

JimmyP

Java Script Interview Questions

The questions come around time and time again but occasionally the techniques change. For example:

javascript Code:
/*
document.write(answersHTML); // long time ago
document.getElementById('answers').innerHTML = answersHTML; // medium time ago
document.getElementById('answers').appendChild(answersDOM); // short time ago
*/
addContent('answers', answersDOM); // recently

pmw57

Java Script Interview Questions

For reference, the questions were all from http://www.geekinterview.com/Intervi...eb/java-Script where people post typical interview questions in order to share typical answers.

The next time I may provide the answers in a random order, and leave it up to the reader to match up the answer with the correct question.
It may be interesting to obtain the correct answers though when half of them are "That's not JavaScript either"

pmw57

Java Script Interview Questions

@viron86, you don't deserve the answers that Paul has given you. Have you heard of Google? Maybe a library? Typing 90% of those questions straight in to Google would get you what you're looking for. Whether this is a homework assignment or a test I'm sure your teacher/professor would be horrified by what you did! How about some proper research! Lazy! (I don't mean offense by this, I am only reflecting what I feel!) If it were me I would do some proper research instead of taking advantage of the all-too-willing Sitepoint forum contributors!

Edit:


All the above is IMHO.

JimmyP

Java Script Interview Questions

Java Script Interview Questions

few important javascript inteview question
if you know the answer do post them
it would be very helpful

1.JavaScript and JScript?
How and in what ways does JavaScript differ from JScript?

JavaScript is the ECMAScript standard, whereas JScript is the microsoft specific flavour that is restricted to version 1.3 of ECMAScript.

2.Redirecting a page
How to redirect a page using JavaScript

location.href = 'page.html';

3.Implement Timer Control
How to implement timer control in JavaScript

myTimer = setTimeout(fn, time);

4.Java swing
why is java swing so efficiently used in most graphics programming and not effected by systems graphic properties?

Swing is to do with Java, not JavaScript. It's the difference between cat and catburgler

5.Differenece between @Posted commands and @commands

That's not JavaScript either.

6.How do you call function in javascript?

You place parenthesis on the end of the function name.

7.How do you get field value in javascript?

var text = field.value;

8.How do you check validations in javascript?

form.onsubmit = validate;

9.Difference between computed field and Computed for display?

That's not JavaScript either.

10.How do you restrict user not to copy web page in Java Script ?

You cannot because the web page is publicly accessible. Some people try to disable the right-click button, but there are always easy workarounds.

11.Script to check every character
Write a code to get the text box data and to check each and every char?

javascript Code:
var text = form[field].value;
return validates = !!(/^[a...z]+$/.exec(text));

12.How will you insert data into db2 using JavaScript?

By using AJAX

13.What is flapjax and what are its benefits compared to javascript . How it converts flapjax code to javascript

flapjax is a templating library built on top of JavaScript..
The flapjax compiler converts it into JavaScript

14.How to validate a Email-address, in Form using JavaScript?

With the following regular expression from http://www.regular-expressions.info/email.html

javascript Code:
/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/

There are simpler less effective email validations that can be performed too. For example:

javascript Code:
/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/

15.What is the difference between java and java script?

That's like asking what's the difference between C++ and C# - they're both completely different languages designed for different purposes.

16.How to prevent a window not to be clicked or selected any way in java script?

Don't load the window. Seriously.

17.What are the methods of validating whether the form is secure?

All client-side forms are insecure, because you can't guarantee that javascript will be running when the form is submitted. Best results are by validating the form on the server-side, then use JavaScript to improve the user experience.

18.Write sample code for pagination using java script.

Use jQuery

javascript Code:
function pageselectCallback(page_id, jq) {
    $('#Searchresult').text("Showing search results " + ((page_id * 10) + 1) + "-" + ((page_id * 10) + 10));
}
$(document).ready(function() {
    // Create pagination element
    $("#Pagination").pagination(300, {
        num_edge_entries: 2,
        num_display_entries: 8,
        callback: pageselectCallback
    });
}

19.What is javascript and what is it functionality?

JavaScript is a client-side scripting language.

20.What is the main difference between Client side JavaScript and and Server side Java Script. How actually

Client-side runs on the client but you cannot guarantee that javascript is enabled on the client. Server-side will always run providing the client supports that feature.

21.Explain about session? Where it runs & what are different types of session handling?

Sessions run on the server and use cookies to store state information.

22.How to add a combo box dynamically at run time in Java script?

By using the DOM.

23.How to go next field without filling the text? Which function should use.Phone No Text validation in

Use the mouse to click on the next field. The function to use for phone no text validation is

24.How to use email validation in Java script.Like User can't enter invalid email address?

Validate the form on the server-side, then perform client-side validation to improve the user experience.

pmw57

Java Script Interview Questions

huh? Most of those questions are so vague!

Bling

Java Script Interview Questions

Sounds more like a test than an interview.....most of those are searchable though.

DaveMaxwell

Java Script Interview Questions

test?

it's a homework assignment

r937

Previous Question:  F S Blackberry curve 8300  Mac Forums  Marketplace ArchiveNext Question:  Feeler Knomo Lydnon Messenger Bag for 15 MBPs  Mac Forums  Marketplace Archive

- Source: Java Script Interview Questions SitePoint Forums JavaScript
- Previous Question: F S Blackberry curve 8300 Mac Forums Marketplace Archive
- Next Question: Feeler Knomo Lydnon Messenger Bag for 15 MBPs Mac Forums Marketplace Archive





AllQuests.com