shachi
09-05-2006, 05:26 PM
Hello all again,
Can anyone tell me how do I pass one variable from one function to the other?? I tried this:
<script ...>
function test1(){
var hello = "Hello World!!!";
alert('from function one '+hello);
test2();
}
function test2(){
alert(hello);
}
</script>
but doesn't work.:(
do I use this??:
function test1(){
var hello = "Hello World!!!";
alert('from function one '+hello);
test2(hello);
}
function test2(hello){
alert(hello);
}
or this:
hello = "Hello World!!!";
function test1(){
alert('from function one '+hello);
test2();
}
function test2(){
alert(hello);
}
Can anyone tell me how do I pass one variable from one function to the other?? I tried this:
<script ...>
function test1(){
var hello = "Hello World!!!";
alert('from function one '+hello);
test2();
}
function test2(){
alert(hello);
}
</script>
but doesn't work.:(
do I use this??:
function test1(){
var hello = "Hello World!!!";
alert('from function one '+hello);
test2(hello);
}
function test2(hello){
alert(hello);
}
or this:
hello = "Hello World!!!";
function test1(){
alert('from function one '+hello);
test2();
}
function test2(){
alert(hello);
}