Hi
I am starting to use ext 1 alpha. I have multiple buttons which will be calling one basic dialog with parameters.
<input type=button id="ss_1" onclick="showDialog(1,2)" value=Play>
<input type=button id="ss_2" onclick="showDialog(2,2)" value=Play>
<input type=button id="ss_3" onclick="showDialog(3,2)" value=Play>
<input type=button id="ss_4" onclick="showDialog(4,2)" value=Play> and so on...
I have no idea how to do that. I couldn't figure out how to pass those parameters to showdialog function in samples. All samples are demonstrated without passing params, I think.
Also, dialog's contents will be changing depends on parameters, so I think I need to use updatemanager object inside dialog.
Please adivse
I am starting to use ext 1 alpha. I have multiple buttons which will be calling one basic dialog with parameters.
<input type=button id="ss_1" onclick="showDialog(1,2)" value=Play>
<input type=button id="ss_2" onclick="showDialog(2,2)" value=Play>
<input type=button id="ss_3" onclick="showDialog(3,2)" value=Play>
<input type=button id="ss_4" onclick="showDialog(4,2)" value=Play> and so on...
I have no idea how to do that. I couldn't figure out how to pass those parameters to showdialog function in samples. All samples are demonstrated without passing params, I think.
Also, dialog's contents will be changing depends on parameters, so I think I need to use updatemanager object inside dialog.
Please adivse

|
#2
|
|
Create a function that takes in those parameters and then creates/shows the dialog with the appropriate content.
![]() |
本文探讨了在ExtJS中如何为多个按钮设置点击事件,以调用同一个基本对话框并传递不同参数的方法。作者遇到了如何通过按钮调用showDialog函数并正确传递参数的问题,并希望了解如何根据不同参数改变对话框的内容。
878

被折叠的 条评论
为什么被折叠?



