Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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:

    http://www.flatironhotel.com/

    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=<propertyI D>

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

  • #2
    Regular Coder
    Join Date
    Feb 2012
    Location
    Nebraska, USA
    Posts
    132
    Thanks
    8
    Thanked 19 Times in 19 Posts
    Hi JSMedia,

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

    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.

  • #3
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for let me know that, I suspected that that might be the case.

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Quote Originally Posted by JSMedia View Post
    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=<propertyI D>
    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.

    Code:
    <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.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •