View Full Version : Add an additional button

31 Jul 2007, 11:27 AM
I have seen lots of forms and dialogs that have a submit, cancel, or reset button.

I have a dialog box that pops up that does all of these things, but I wanted to add a "Test Connection" button. Basically the data that is pulled into this dialog box will include ftp or scp information, and I would like to add a button that calls a php script that will check host names, user, pw, all that, and report back.

But basically I still have a hard time following the documentation, on what to call, how to call it, etc...So all I have is a test connection button so far, that does nothing. ;)

What's the best way to call a url from a custom button? Trust me, I know this is junk and url doesn't work here...but my best approach would be?

if (!updateInstanceDlg) {
updateInstanceDlg = createNewDialog("a-updateInstance-dlg");
updateInstanceDlg.addButton('Test Connection', function() {
waitMsg:'Testing Connection...';
// url: 'script/demo.php';

31 Jul 2007, 3:05 PM
I would keep your function outside of the button for cleanliness. Look at the ajax documentation.