Sunday, March 11, 2012

problem passing variable

Hi,

What you mean that "put 'res4.value' in another javascript function for storing values in my database"?

Is there a webservice to store these values in your database?

What's the error?


ok, i made it confusing. Please forget the db action. Let's say i want to use the alert in another javascript function. How can i do this?


Hi,

You can save the value in a hidden text or in a javascript variable,then you can use it in another javascript function.

var a = "";

function callback_test4(res4) {

a = res4.value;

}

function anotherfunction() {

alert (a);

}

Thanks


Check it out

var a;

function getValue(res4)

{

a = res4.value;

}

function alertValue()

{

alert('Value of res4 :' +a);

}

No comments:

Post a Comment