Hi Folks,

I am trying to wrap a form around a basic dialog so that when the user clicks the submit button the form is submitted as per it's defined action. The following is my code, I am pretty new to this stuff but I have a feeling I am being very optimistic thinking this code would work. What I was hoping is that the 'runprogram.php' would be called, but it doesn't appear to be.

Code:
var SubmitForm = function() {
	     var tform = getEl('test');
	    tform.submit;
	//	vardiaProgram.hide();
     }; 	

function init (){
    vardiaProgram = new YAHOO.ext.BasicDialog("diaProgram",
       {modal:true,autoTabs:true,width:500,height:300,shadow:true,minWidth:300,minHeight:300
  });
vardiaProgram.addButton('Submit', SubmitForm);
vardiaProgram.show();
}
YAHOO.util.Event.addListener(window, "load", init);
</script>

<body>
<form id="test"  method="POST" action="http://localhost/jc/php/runprogram.php">
<div id="diaProgram" style=";visibility:hidden">
<div class="ydlg-hd">Add Dialog</div>
<div class="ydlg-bd">
<label for="fldField1"> Enter this:</label> <input id="fldField1" />
</div>
<div class="ydlg-ft"></div>
</div>
</form>



TIA,
JC