WordPress.org

Ready to get started?Download WordPress

Forums

Need to pass values to another page showing iframe (2 posts)

  1. csimpson
    Member
    Posted 9 months ago #

    hi there, i hope i explain this good enough, im looking for some guidance on where to go from here:

    I am displaying an iframe on a web page which is a third party hotel system. this works fine by default and loads the start of their room booking process, i.e. dates of stay and number of people etc.

    However, i want to have a seperate form on another page that allows the visitor to begin searching the external iframe system (still displayed on my site) so that when they click submit on the form, the have already specified the date they want to stay and how many people for.

    Ive had a go from searching around, ive pointed the form to the page containing the iframe, but no luck - something wrong!

    I know the parameters that i can use on the third party system as they are all present on the form.

    My page form code and other page iframe detailed below.

    Any ideas how this is suppose to work. What am i missing? is there a plugin to handle this?

    Regards Craig
    form:

    <form action="/book-online/" class="FormGuestline" id="FormGuestline" method="POST" onsubmit="return loadIframe('iframeTarget', this.href)">
    	<input name="request_locale" type="hidden" value="en" />
    	<input name="siteId" type="hidden" value="KAYSGATE" />
    	<input name="pagename" type="hidden" value="Book-Now-Connaught-Hotel-Bournemouth" />
    	<input name="chainAction" type="hidden" value="newAvailabilitySearch" />
    
    	<div class="FormField Arrival">
    		<label for="arrival">Arrival Date</label> <input id="arrival" name="arrival" type="text" /></div>
    	<div class="FormField Departure">
    		<label for="departure">Departure Date</label> <input id="departure" name="departure" type="text" /></div>
    	<div class="FormField NumberOfPersons">
    		<label for="numberOfPersons">Adults</label> <select id="numberOfPersons" name="numberOfPersons"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></div>
    	<div class="FormField NumberOfChildren">
    		<label for="numberOfChildren">Children</label> <select id="numberOfChildren" name="numberOfChildren"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></div>
    	<div class="FormField Submit">
    		<input type="submit" value="Book now" /></div>
    </form>

    Current iframe on page /book-online/ (thats works independently):
    <iframe name="iframeTarget" id="iframeTarget" src="https://uk2.roomlynx.net/rezrooms2/loadOBMApplication.action?siteId=KAYSGATE&chainAction=newAvailabilitySearch&request_locale=en" width="1200px" height="1235px" frameborder="0" scrolling="no" allowTransparency="true" seamless></iframe>

  2. csimpson
    Member
    Posted 9 months ago #

    Could do with some help please?

    I'm making progress. here is form:

    <form target="iframeTarget" action="/book-online/" class="FormGuestline" id="FormGuestline" method="GET">
    	<input name="request_locale" type="hidden" value="en" />
    	<input name="siteId" type="hidden" value="KAYSGATE" />
    	<input name="pagename" type="hidden" value="Book-Now" />
    	<input name="chainAction" type="hidden" value="newAvailabilitySearch" />
    
    	<div class="FormField Arrival">
    		<label for="arrival">Arrival Date</label> <input id="arrival" name="arrival" type="text" /></div>
    	<div class="FormField Departure">
    		<label for="departure">Departure Date</label> <input id="departure" name="departure" type="text" /></div>
    	<div class="FormField NumberOfPersons">
    		<label for="numberOfPersons">Adults</label> <select id="numberOfPersons" name="numberOfPersons"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></div>
    	<div class="FormField NumberOfChildren">
    		<label for="numberOfChildren">Children</label> <select id="numberOfChildren" name="numberOfChildren"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></div>
    	<div class="FormField Submit">
    		<input type="submit" value="Book now" /></div>
    </form>

    here is iframe
    <iframe name="iframeTarget" id="iframeTarget" src="https://externalwebsite.action" width="1200px" height="1235px" frameborder="0" scrolling="no" allowTransparency="true" seamless></iframe>

    outcome is this:
    http://www.mywebsite/book-online/?request_locale=en&siteId=KAYSGATE&pagename=Book-Now-Connaught-Hotel-Bournemouth&chainAction=newAvailabilitySearch&arrival=28%2F11%2F2013&departure=29%2F11%2F2013&numberOfPersons=2&numberOfChildren=2

    so almost there, the resulting page receiving the parameters is displaying the passed parameters in the url, but it is not affecting the iframe.

Reply

You must log in to post.

About this Topic