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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Parameters to Onclick Procedure

Status
Not open for further replies.

bestbefore99

IS-IT--Management
Jan 24, 2002
16
IT
Hello experts.

I have create programmatically a form with a lot of buttons
using CreateControl. For each button I want that when the user click on it, it changes color . I have created for all buttons (I may have up to 500 on a single form) the OnCLick function
ctl.Onclick = "=functionname()"
but my problem is to pass to the functionname which control was clicked.

Unfortunately I cannot make it working


Any suggestion?


Thanks
Max
 
Max,
All you really need to do is pass the name of the control in the function call:

ctl.Onclick = "=functionname(""ctlname"")"

You can find the name of ctl in ctl.Properties("Name")

Good Luck,
Tranman

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top