Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return value from Javascript function

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
US
Button1.Attributes.Add("onclick", "testClient();")

On clientSide I have:
//--------------------------------------------------
function testClient()
{
doyou = confirm("You are about to delete rows that are checked? (OK = Yes Cancel = No)");

if (doyou == true){
return true;}

if (doyou == false){
return false;}

}
//-------------------------------------------------------
I want to do something like this:

dim test as boolean
test = Button1.Attributes.Add("onclick", "testClient();")

Now test contains the value returned from testClient()

How can I do this?
 
After browsing around the forum I found that I can do this:

Button.Attributes.Add("onClick", "return confirm('Are you sure you wish to delete this item?');")

But how would I assign the value returned to a variable.
if true then
'delete
else
' do nothing
endif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top