View Full Version : How do I make a form submit into a URL address on a new/blank page?

02-10-2012, 10:01 PM
Please excuse me if this has already been answered, I didn't have much time to look around becasue I'm on a schedule. Here is my problem:

I know how to make an email submit form, but that's not what I want.

I want a submit form that takes the specified information and plugs it into spots designated into a URL link that is opened in a new blank page. Here is an example from a site that does this:


If you view the code, the form for BOOK A ROOM is actually somehow sent into a url link in a new window, with the info plugged into it: http://clients.innroad.com/<client_code>/logon.aspx?adults=<adults>&children=<children>&dateStart=<date>&dateEnd=<date>&propertyID=<propertyID>

Thank you for reading this and thanks to anyone in advance for responding.

02-10-2012, 10:42 PM
Hi JSMedia,

Welcome to CodingForums.com, we're glad to help out :D

The way that this flatironhotel.com is set up is using something called a CMS(Content Management Center). Meaning there is a lot of stuff going on in the background that we can't see using the View-Source or Inspect-Element options in browsers since it's calling in multiple external pages to populate this one HTML page.

Chances are that when you hit the 'check availability' button it's storing the input data from the form using a CMS language (either ColdFusion or PHP or Java) then re-calling that information on the new that opens up.

I'm unaware of any way to do this using purely HTML or CSS, javascript would most likely be your best bet if you're trying to store information that gets called up on a new page.

02-10-2012, 11:07 PM
Thank you for let me know that, I suspected that that might be the case.

02-11-2012, 06:05 AM
If you view the code, the form for BOOK A ROOM is actually somehow sent into a url link in a new window, with the info plugged into it: http://clients.innroad.com/<client_code>/logon.aspx?adults=<adults>&children=<children>&dateStart=<date>&dateEnd=<date>&propertyID=<propertyID>You create a query string (the thing after the question mark) by using the HTTP GET method. You can invoke this method in a form by setting your form element's method attribute value to get. The string is composed of the name attribute/value pairs from your form's form controls.

You can make form submission invoke a new window via a target="_blank" attribute.

<form method="get" action="http://www.example.com/" target="_blank">

As for putting this URL information to use on the new page: you'll need a server-side script on the new page that makes use of it.