473,396 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

calling a function with a parameters

8
i have a function called max(form) in the javaScript file .. and this is been called fromt he HTML page ...

and below the HTML page there is a button.. where when u click it, the function menu () should be called ... but

in the function menu we should call the function max(form) .. how do we do it ??

idea in brief .. how do we call the function max(form) from the function menu..

Question 2. ) calling a function means, textual pasting of the codes of a function...
Jun 11 '08 #1
2 969
r035198x
13,262 8TB
i have a function called max(form) in the javaScript file .. and this is been called fromt he HTML page ...

and below the HTML page there is a button.. where when u click it, the function menu () should be called ... but

in the function menu we should call the function max(form) .. how do we do it ??

idea in brief .. how do we call the function max(form) from the function menu..

Question 2. ) calling a function means, textual pasting of the codes of a function...
Expand|Select|Wrap|Line Numbers
  1. function menu() {
  2. var form = // get the form here
  3. max(form); //calling max(form) from the function menu
  4. }
2.) NO. Calling a function is just writing the function name and passing the required parameters if any.

P.S A Javascript tutorial is not a bad thing to go through at this stage.
Jun 11 '08 #2
rnd me
427 Expert 256MB
Expand|Select|Wrap|Line Numbers
  1.  
  2. function max(form){
  3.  return "this is the code that will be returned";
  4. }
  5.  
  6. function menu(){
  7.    alert(String(max));
  8. }
  9.  
  10. menu() 



shows:

"function max(form) {
return "this is the code that will be returned";
}
Jun 11 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Muthu | last post by:
I've read calling conventions to be the order(reverse or forward) in which the parameters are being read & understood by compilers. For ex. the following function. int Add(int p1, int p2, int...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
11
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
4
by: astri | last post by:
#include "Unit1.h" #include "math.h" #include "fixed_math.hpp" #include "algorithm.h" #define MBIT 0x4000 #define CBIT 16 long constbl; void __fastcall TForm1::Button1Click(TObject...
10
by: sulekhasweety | last post by:
Hi, the following is the definition for calling convention ,which I have seen in a text book, can anyone give a more detailed explanation in terms of ANSI - C "the requirements that a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.