GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Web  >  java Script
Go To First  |  Previous Question  |  Next Question 
 java Script  |  Question 19 of 23    Print  
How do you call function in javascript?

  
Total Answers and Comments: 2 Last Update: August 10, 2008     Asked by: parthoaccy 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 09, 2008 01:22:26   #1  
rupngr Member Since: May 2008   Contribution: 4    

RE: How do you call function in javascript?

<script language="javascript" type="text/javascript">

//Declare Function
function a()

{
    alert("function called");
}


//call function from the script it self
a();

</script>

//call function on button click
<input type="button" onclick="a()"/>


 
Is this answer useful? Yes | No
August 10, 2008 22:13:22   #2  
IRS786 Member Since: August 2008   Contribution: 2    

RE: How do you call function in javascript?
for example:
<html>
<head>
<script type="javascript">
function call()
{
alert{are u calling me!};
}
</script>
</head>
<body>
<form>
<input type="button" onclick="call()" value="call">
</form>
</body>

 
Is this answer useful? Yes | No

 Related Questions

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

What is the main difference between Client side JavaScript and and Server side Java Script. How actually they run on both side with Example?
Read Answers (1) | Asked by : vaibhav

Latest Answer : JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language (a scripting language is a lightweight programming language) A JavaScript consists of lines of executable computer code A JavaScript is usually embedded directly ...

Latest Answer : var reg = /^([A-Za-z0-9_-.])+@([A-Za-z0-9_-.])+.([A-Za-z]{2,4})$/; var address = document.form1.email.value; if(reg.test(address) == false) { alert('Invalid Email Address'); document.form1.email.focus(); return false; } ...
Read Answers (2) | Asked by : Devika.N

What is flapjax and what are its benefits compared to javascript . How it converts flapjax code to javascript code during compilation
View Question | Asked by : miramekala

Latest Answer : Using J Query ...
Read Answers (1) | Asked by : ram

Latest Answer : for example form validation:function formvalidation(form){if (nonempty(form.req1)){if (nonempty(form.req2)){return true;}}return false;}function nonempty(elem){char str=elem.value;if(str.length==0){alert("u ...

Latest Answer : getElementById(""); ...

Latest Answer : for example:function call(){alert{are u calling me!};} ...

How to implement timer control in JavaScript 
Latest Answer : set Timedout("alert('5 seconds')",5000);will display display alert box after 5 seconds ...


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

jQuery - JavaScript Pagination

Learning jQuery JavaScript Pagination Let s examine how we would add JavaScript pagination to the table we have already made sortable in the browser First we ll focus on displaying a particular page of data disregarding user interaction for now mosgoogle geshibot lang php&quot; document ready
 

jQuery - JavaScript Sorting

Learning jQuery JavaScript Sorting There are times though when we either don t want to wait for server responses when sorting or don t have a server side scripting language available to us A viable alternative in this case is to perform the sorting entirely on the browser using JavaScript client sid
 

Microsoft AJAX Library - JavaScript Execution Context

JavaScript Execution Context In this section we ll take a peek under the hood of the JavaScript closures and the mechanisms that allow us to create classes objects and object members in JavaScript For most cases understanding these mechanisms isn t absolutely necessary for writing JavaScript code&am
 

Microsoft AJAX Library - C# and JavaScript Classes

C and JavaScript Classes For the purpose of demonstrating a few more OOP related concepts we ll use another class Our new class is named Table and it has two public fields rows columns and one method getCellCount The getCellCount method should return the number of rows multiplied by the number of co
 

Microsoft AJAX Library - JavaScript Classes

JavaScript Classes Not only can JavaScript functions contain other functions but they can also be instantiated This makes JavaScript functions a good candidate for implementing the concept of a class from traditional object oriented programming This is very helpful feature indeed because JavaScript
 

Microsoft AJAX Library - JavaScript Functions

JavaScript Functions A simple fact that was highlighted in the previous chapter but that is often overlooked is key to understanding how objects in JavaScript work code that doesn t belong to a function is executed when it s read by the JavaScript interpreter while code that belongs to a function is
 

Microsoft AJAX Library - Object-Oriented JavaScript

Object Oriented JavaScript Objects and classes are implemented differently in JavaScript than in languages such as C VB NET Java or C However when it comes to using them you ll feel on familiar ground You create objects using the new operator and you call their methods or access their fields using t
 

C++ Pure Virtual Function and Base Class

C Pure Virtual Function and Virtual Base Class In this C tutorial you will learn about pure virtual function declaration of pure virtual function and virtual base class virtual base class and how to implement a virtual base class explained with examples mosgoogle center What is Pure Virtual Function
 

C++ Function Passing Types

C Function Passing Types In this C tutorial you will learn about function passing types two types of arguments passing in functions passed by value&nbsp; and&nbsp; passed by reference are discussed here mosgoogle center The arguments passed to a function can be performed in two ways Passed
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape