There is a similar question which demonstrates how to do it in jQuery. Unfortunately, I'm using prototype and translating the code isn't very straight forward.
Submit form and stay on same page?
What needs to happen is the value (email) is posted to the page on the subDomain and the user does not get redirected. I do not have any control to edit the page on the subDomain.
Any assistance would be appreciated.
function submitEmailForm(){
var userEmail = $('Text').value;
$('EmailForm').action = 'http://subDomain.myDomain.com/?email_address='+userEmail;
$('EmailForm').request({ onComplete: function(){ return false;} });
}
<form method="post" id="EmailForm" onsubmit="submitMobileEmailForm(); return false;">
<input type="text" id="Text"/>
<input type="submit" id="Submit" value=""/>
</form>