Posting form data to another url and and opening page in the new url

Posting form data to another url and and opening page in the new url

Hi,

I am quite confused with the process of postUrl.

On submit I need to post form data to an external url which will auto populate matching form fields and trigger an event (submit Form). All this must happen in the same window. Please inform where I am going wrong.

input.adult_no2 = postUrl("http://demo..co.uk/searchhotel",input.adult_no2);