I am making a dynamic javascript dialog and the user has the ability to add buttons through the toggleModal method. I also want to be able to assign call backs for the buttons. So right now I have:
[code]
onclick=”toggleModal(‘A title’,’Are you sure you want to click these buttons?’,’Yes,No,Maybe’);”
That makes my dialog, gives it a title of ‘A title’, the message is ‘Are you sure you want to click these buttons?’, and you can create however many buttons you like in the last param (I split at the comma and then run a loop to create the buttons).
Now the only way I can think of doing this is something like adding the function name after the buttons like this.. and I dont even know if that will work
[code]
onclick=”toggleModal(‘A title’,’Are you sure you want to click these buttons?’,’Yes,No,Maybe’,’function1,function2,function3′);”
What would you guys suggest?