Hi Newbie here,
I am trying to get a solution for a tracking form that is very basic
Code:
<FORM ACTION="https://obc.canadapost.ca/emo/basicPin.do" method="post" TARGET="_blank">
<input type="hidden" name="AppLanguage" value="En">
<input type="text" size="30" name="temp_trkid1"><br><br>
<input type="submit" value="Track Package">
<input type="reset" value="Reset" >
</FORM>
this auto fills the form on the page being posted however I cannot get the form to auto execute the submit of the other form in order to get a result. The other form uses this for the submit button
Code:
<input type="button" class="bluebutton" value=" Submit " onclick="submitPIN('basicPinForm');">
as you can see this in turn is calling a function submitPIN with object basicPinForm
The function submitPIN consists of
Code:
function submitPIN(obj) {
if (obj=="") return;
var formObj = eval("document." + obj);
if (!validate(formObj.temp_trkid1.value)) {
alert('Invalid characters in the input fields. Please check your entries and try again.');
return;
}
if (formObj.temp_trkid1.value=="") {
alert('No Item number was submitted. Please enter a number and click Submit.');
return;
}
/* done in the form
if (!numberOfItems(formObj.temp_trkid1.value)) {
alert('Maximum number of Items you can search for is 24');
return;
}
*/
formObj.trackingId.value=formObj.temp_trkid1.value ;
formObj.trackingCode.value='PIN';
formObj.submit();
}
I had tried numerous methods to get this to work, but to no avail. I do not know if this can be done with an onSubmit, the form is on one server with access to it and the other form on another server that is the distribution service server and has no access to the files, thus everything has to be done from the one form.
Does anyone know of a solution to get the posted form to activate the submit of the other form this form will be either in html php or javascript if it is resolvable.
If this is not at all possible can someone let me know as my head is getting sore from banging it against this brick wall.
Many thanks in advance