Vanilla 1.1.10 es un producto de Lussumo. Para más información: Documentación, Soporte.
<!-- start copy sourcecode from here -->
<div id="searchboxInc">
<form id="frm" name="frm" action="http://www.booking.com/searchresults.html" method="get" target="_blank" autocomplete="off">
<fieldset>
<div id="destinationSearch">
<input type="hidden" name="aid" value="331830" />
<input type="hidden" name="error_url" value="http://www.booking.com/?aid=331830;" />
<input type="hidden" name="si" value="ai,co,ci,re,di" />
<input type="hidden" name="label" value="" />
<input type="hidden" name="lang" value="es" />
<input type="hidden" name="nflt" value="" />
<input type="hidden" name="ifl" value="" />
<p>Buscar hoteles</p>
<label for="destination">Destino</label>
<input
class="text" type="text" id="destination" name="ss" value="" title="Ciudad, Región, País, Lugar de interés, Hotel, Zona" autocomplete="off" />
</div>
<div id="inout">
<div id="homein">
<h3>Fecha de entrada</h3>
<select id="b_checkin_day" name="checkin_monthday" onchange="checkDateOrder('frm', 'b_checkin_day', 'b_checkin_month', 'b_checkout_day', 'b_checkout_month') ; tickCheckBox('b_availcheck');">
<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><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option><option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option><option value="29">29</option><option value="30">30</option><option value="31">31</option>
</select>
<select id="b_checkin_month" name="checkin_year_month" onchange="checkDateOrder('frm', 'b_checkin_day', 'b_checkin_month', 'b_checkout_day', 'b_checkout_month') ; tickCheckBox('b_availcheck');">
<script language="Javascript">
var monthArray=new Array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre");
var today = new Date();
var month= today.getMonth();
var year = today.getFullYear()%100;
var fullYear=today.getFullYear();
year=new String(year);
year=addzero(year);
var countMonth=month;
for(var i=0;i<12;i++,countMonth++){
if(countMonth%12==0 && i>0){
countMonth=0;
year++;
year=new String(year);
year=addzero(year);
fullYear++;
}
document.writeln("<option value=\""+fullYear+"-"+(countMonth+1)+"\">"+monthArray[countMonth]+" '"+year);
}
</script>
</select>
</div>
<div id="homeout">
<h3>Fecha de salida</h3>
<select id="b_checkout_day" name="checkout_monthday" onchange="tickCheckBox('b_availcheck');">
<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><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option><option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option><option value="29">29</option><option value="30">30</option><option value="31">31</option>
</select>
<select id="b_checkout_month" name="checkout_year_month" onchange="tickCheckBox('b_availcheck');">
<script language="Javascript">
var monthArray=new Array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre");
var today = new Date();
var month= today.getMonth();
var year = today.getFullYear()%100;
var fullYear=today.getFullYear();
year=new String(year);
year=addzero(year);
var countMonth=month;
for(var i=0;i<12;i++,countMonth++){
if(countMonth%12==0 && i>0){
countMonth=0;
year++;
year=new String(year);
year=addzero(year);
fullYear++;
}
document.writeln("<option value=\""+fullYear+"-"+(countMonth+1)+"\">"+monthArray[countMonth]+" '"+year);
}
</script>
</select>
</div>
<div class="avail">
<input id="availcheck" type="checkbox" name="idf" value="on" />
<label id="labfor" for="availcheck">
Todavía no he decidido las fechas
</label>
</div>
</div>
<div class="but">
<button type="submit">Buscar</button>
</div>
</fieldset>
</form>
<script language="Javascript">
var currentDate = new Date(); var currentYear = 1900 + currentDate.getYear();
var dailyMS = 24*60*60*1000;
var arrivalDate = new Date(currentDate.getTime());
var departureDate = new Date(currentDate.getTime() + 1*dailyMS);
var arrivalYear = 1900+arrivalDate.getYear();
var arrivalMonth = 1+arrivalDate.getMonth(); var arrivalDay = arrivalDate.getDate();
var departureYear = 1900+departureDate.getYear();
var departureMonth = 1+departureDate.getMonth(); var departureDay = departureDate.getDate();
var a=document.frm;
if ((a.checkin_monthday.selectedIndex == 0) && (a.checkout_monthday.selectedIndex == 0)){
a.checkin_monthday.options[arrivalDay-1].selected = true;
a.checkout_monthday.options[departureDay-1].selected = true;
}
var frm = document.getElementById('frm');
// create date object from checkin values
// set date to 12:00 to avoid problems with one
// date being wintertime and the other summertime
var my = frm['b_checkin_month'].value.split("-");
var ci = new Date (my[0], my[1]-1, frm['b_checkin_day'].value, 12, 0, 0, 0);
// create date object from checkout values
my = frm['b_checkout_month'].value.split("-");
var co = new Date (my[0], my[1]-1, frm['b_checkout_day'].value, 12, 0, 0, 0);
if (ci >= co){
co.setTime(ci.getTime() + 1000 * 60 * 60 * 24);
frm['b_checkout_day'].value = co.getDate();
var com = co.getMonth()+1;
frm['b_checkout_month'].value = co.getFullYear() + "-" + com;
}
</script>
</div>
<div id="calendar"></div>
<script type="text/javascript">
Date.MILLISECONDS_PER_DAY = Date.prototype.MILLISECONDS_PER_DAY = 86400000;
var browser = navigator.appName
var version = navigator.appVersion
var startstring = parseFloat(version.indexOf("MSIE"))+1
var browserverion = parseFloat(version.substring(startstring+4,startstring+7))
var isIE5 = ((browser=="Microsoft Internet Explorer") && (browserverion < 6))? true : false;
var isIE6 = ((browser=="Microsoft Internet Explorer") && (browserverion > 5.5) && (browserverion < 6))? true : false;
// Put placeholder in destination input box if empty, and remove when focused
var destination = document.getElementById('destination');
destination.onblur = function () {
if (!this.value) {
this.value = this.getAttribute('title');
this.className += ' blur';
}
}
destination.onfocus = function () {
if (this.value == this.getAttribute('title')) {
this.value = '';
this.className = this.className.replace(/ blur/, '');
}
}
destination.onblur();
function tickCheckBox(el) {
if (document.getElementById) {
if (document.getElementById(el)) {
document.getElementById(el).checked = false;
}
}
return true;
}
Date.prototype.getTwoDigitMonth = function () {
// Returns a two-digit string from '01' to '12' representing the month property of a Date object.
var month = (this.getMonth() + 1).toFixed().toString();
if (month.length == 1) {
month = '0' + month;
}
return month;
};
function checkDateOrder(me, ci_day, ci_month_year, co_day, co_month_year) {
var
frm = document.getElementById('frm'),
my,
ci = new Date( 0 ),
co = new Date( 0 ),
com,
today = new Date();
// create date object from checkin values
// set date to 12:00 to avoid problems with one
// date being wintertime and the other summertime
if ( frm[ci_day].value !== '0' )
{
ci.setDate( frm[ci_day].value );
}
if ( frm[ci_month_year].value !== '0' )
{
my = frm[ci_month_year].value.split( "-" );
ci.setFullYear( my[0] );
ci.setMonth( my[1] - 1 );
}
ci.setHours( 12 );
ci.setMinutes( 0 );
ci.setSeconds( 0 );
// create date object from checkout values
if ( frm[co_day].value !== '0' )
{
co.setDate( frm[co_day].value );
}
if ( frm[co_month_year].value !== '0' )
{
my = frm[co_month_year].value.split( "-" );
co.setFullYear( my[0] );
co.setMonth( my[1] - 1 );
}
co.setHours( 12 );
co.setMinutes( 0 );
co.setSeconds( 0 );
// If the new checkin date's month does not match
// the current value of the dropdown, then it is
// because the month was incremented creating an
// invalid date (e.g. February 31st).
// We'll cycle back the checkin date until we're in
// the correct month.
if ( frm[ci_month_year].value !== '0' )
{
while ( ci.getMonth() != frm[ci_month_year].value.split( "-" )[1] - 1 )
{
ci.setDate( ci.getDate() - 1 );
frm[ci_day].value = ci.getDate();
}
var cim = ci.getMonth() + 1;
frm[ci_month_year].value = ci.getFullYear() + "-" + cim;
}
// if checkin date is at or after checkout date,
// add a day full of milliseconds, and set the
// selectbox values for checkout date to new value
if ( ci >= co )
{
co.setTime( ci.getTime() + Date.prototype.MILLISECONDS_PER_DAY );
com = co.getMonth() + 1;
if ( frm[ci_day].value !== '0' )
{
frm[co_day].value = co.getDate();
}
if ( frm[ci_month_year].value !== '0' )
{
frm[co_month_year].value = co.getFullYear() + "-" + com;
}
}
}
function updateDaySelect( me )
{
// 1-2 testing
if ( !booking.env.b_simple_weekdays_for_js )
{
return;
}
var frm = document.getElementById('frm');
if ( frm.getAttribute( 'id' ) !== 'frm' && frm.className !== 'availForm' )
{
return;
}
// Check if we have all fields. If not, we are in the first stage
// of the book process and should not auto-update selects since there
// is only the check-in select and the amount of nights.
if ( !frm.checkin_monthday || !frm.checkout_monthday || !frm.checkin_year_month || !frm.checkout_year_month )
{
return;
}
if ( frm.checkin_monthday.value === '0' && frm.checkout_monthday.value === '0' && frm.checkin_year_month.value === '0' && frm.checkout_year_month.value === '0' )
{
return;
}
// If the year-month fields have nonzero values, prepend the day of the week to each monthday in the check-in and check-out monthday Selects.
var
ci_d = frm.checkin_monthday,
co_d = frm.checkout_monthday,
ci_my,
co_my,
todaysDate;
// If the form field has a nonzero value, use it;
if ( frm.checkin_year_month.value !== '0' )
{
ci_my = frm.checkin_year_month.value.split( "-" );
}
else
{
// Use the current date value.
todaysDate = new Date();
ci_my = [ todaysDate.getFullYear(), todaysDate.getTwoDigitMonth() ];
}
if ( frm.checkout_year_month.value !== '0' )
{
co_my = frm.checkout_year_month.value.split( "-" );
}
else
{
todaysDate = new Date();
co_my = [ todaysDate.getFullYear(), todaysDate.getTwoDigitMonth() ];
}
var
ci_sel = Math.max( ci_d.selectedIndex, 0 ),
co_sel = Math.max( co_d.selectedIndex, 0 ),
ci_sel_value = ci_d[ ci_sel ].value,
co_sel_value = co_d[ co_sel ].value,
monthDays = [],
opt,
i;
ci_d.innerHTML = '';
co_d.innerHTML = '';
var MonthdayPromptOption = function ()
{
this.option = {
"_this" : this,
"@selected" : "selected",
"@class" : "day prompt site_experiment_encourage_date_entry_2",
"@value" : 0,
"#text" : "día"
};
};
if ( ci_sel_value === '0' )
{
buildHtmlNode( new MonthdayPromptOption(), ci_d ).selected = true;
}
if ( co_sel_value === '0' )
{
buildHtmlNode( new MonthdayPromptOption(), co_d ).selected = true;
}
function writeMonthdaysOptions( numberOfMonthdaysToShow, yearMonthSelectElement, monthDaysArray, monthDaysSelectElement, monthDaySelectValue )
{
var i, optionElementInnerHTML, optionElement;
for ( i = 0; i < numberOfMonthdaysToShow; i++ )
{
optionElement = document.createElement( 'option' );
optionElementInnerHTML = i + 1;
if ( yearMonthSelectElement.value !== '0' )
{
optionElementInnerHTML = monthDaysArray[i] + ' ' + optionElementInnerHTML;
}
optionElement.innerHTML = optionElementInnerHTML;
optionElement.value = ( i + 1 );
if ( i > 0 && monthDaySelectValue == i + 1 )
{
optionElement.defaultSelected = optionElement.selected = true;
}
monthDaysSelectElement.appendChild( optionElement );
}
}
// Check-in month
monthDays = buildDaysForMonth( ci_my[0], ci_my[1] );
var numberOfMonthdaysToShow = 31;
if ( frm.checkin_year_month.value !== '0' )
{
numberOfMonthdaysToShow = monthDays.length;
}
writeMonthdaysOptions( numberOfMonthdaysToShow, frm.checkin_year_month, monthDays, ci_d, ci_sel_value );
// Checkout month
monthDays = buildDaysForMonth( co_my[0], co_my[1] );
numberOfMonthdaysToShow = 31;
if ( frm.checkout_year_month.value !== '0' )
{
numberOfMonthdaysToShow = monthDays.length;
}
writeMonthdaysOptions( numberOfMonthdaysToShow, frm.checkout_year_month, monthDays, co_d, co_sel_value );
// IE 6 exhibits a bug whereby the value of the monthday select always jumps to zero.
if (isIE6) {
ci_d.value = ci_sel_value;
co_d.value = co_sel_value;
}
}
function buildDaysForMonth( year, month )
{
// Month index starts on 0(-11) in Date()-object
var monthDate = new Date( year, month - 1 );
var orgMonth = monthDate.getMonth();
var dayArray = [], weekDay;
while ( monthDate.getMonth() == orgMonth )
{
// Week starts on Sunday in Date()-object
weekDay = ( monthDate.getDay() == 0 ) ? 6 : ( monthDate.getDay() - 1 );
dayArray.push( booking.env.b_simple_weekdays_for_js[weekDay] );
monthDate.setDate( monthDate.getDate() + 1 );
}
return dayArray;
}
function buildHtmlNode (elementsObject, targetNode, refChild)
{
/*
Accepts an object of elements where the key specifies the tagname unless prefixed by @, in which case it specifies an attribute of the parent, or when it is #cdata, in which case it specifies a CDATA child.
http://xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
The big flaw now is the case <a><b/><c/><b/><a/>, which cannot be represented as a JS object. In that case interject an array of generic div or span elements.
*/
// If we want to validate as JSON, we must make sure what we pass in is JSON, which it presently isnot.
//elementsObject = booking.json.validate(elementsObject);
var
key,
counter,
found,
newElement,
newNode;
for (key in elementsObject)
{
if (elementsObject.hasOwnProperty(key))
{
var
prefix = key.substring(0, 1),
primaryKey = key.substring(1);
if (prefix != '_') // We??e on a non-DOM key, so skip.
{
if (prefix == '@') // Attribute
{
if (!targetNode.getAttribute(primaryKey))
{
// Perhaps extend this in the future to support multiple class values.
targetNode.setAttribute(primaryKey, elementsObject[key]);
}
}
else
{
if (prefix == '#') // Text or CDATA
{
if (primaryKey == 'text') // Text
{
found = false;
if (targetNode.childNodes && targetNode.childNodes.length > 0)
{
// Traverse text node children and append only if it isn?? already there.
counter = 0;
while (counter < targetNode.childNodes.length && !found)
{
if (targetNode.childNodes[counter].nodeType == Node.TEXT_NODE && targetNode.childNodes[counter].nodeValue == elementsObject[key])
{
found = true;
}
counter++;
}
}
if (!found)
{
// MGP 040209: Cope with strings split by linebreaks - need to insert <br> elements
if ( elementsObject[key].indexOf("\n") == -1 )
{
newNode = document.createTextNode(elementsObject[key]);
if (refChild)
{
targetNode.insertBefore(newNode, refChild);
}
else
{
targetNode.appendChild(newNode);
}
}
else
{
// Found some linebreaks - split the string into component parts
var newNodeParts = elementsObject[key].split("\n");
// Loop through the parts, adding a linebreak after each one (except the last one)
for ( var i = 0; i < newNodeParts.length; i++ )
{
// Check for the existence of a star rating in the text node
if ( newNodeParts[i].match(/\d\*$/) )
{
// Found a star rating - extract the star
lastSpace = newNodeParts[i].lastIndexOf(" ");
newNodeString = newNodeParts[i].substring( 0, lastSpace );
starImgSrc = 'http://r.bstatic.com/static/img/icons/stars/' + newNodeParts[i].substr( lastSpace + 1, 1 ) + 'sterren-small.png';
}
else
{
newNodeString = newNodeParts[i];
starImgSrc = '';
}
newNode = document.createTextNode(newNodeString);
if (refChild)
{
targetNode.insertBefore(newNode, refChild);
if ( starImgSrc )
{
newImg = document.createElement('img');
newImg.setAttribute('src', starImgSrc);
newImg.className = "stars";
targetNode.insertBefore(newImg, refChild);
}
}
else
{
targetNode.appendChild(newNode);
if ( starImgSrc )
{
newImg = document.createElement('img');
newImg.setAttribute('src', starImgSrc);
newImg.className = "stars";
targetNode.appendChild(newImg);
}
}
if ( i < newNodeParts.length - 1)
{
// Add a <br>
newBR = document.createElement("br");
if (refChild)
{
targetNode.insertBefore(newBR, refChild);
}
else
{
targetNode.appendChild(newBR);
}
}
}
}
}
}
else
{
if (primaryKey == 'cdata') // CDATA
{
targetNode.appendChild(document.createCDATASection(elementsObject[key]));
}
}
}
else // Element
{
// If targetNode was passed into this function, append the new child to it??
if (targetNode)
{
// If elementsObject[key] is an array, we??l create an element of type key for each array member.
if (elementsObject[key].length > 0)
{
for (counter = 0; counter < elementsObject[key].length; counter++)
{
if (elementsObject[key][counter])
{
if (!elementsObject[key][counter]._node)
{
newElement = document.createElement(key);
elementsObject[key][counter]._node = newElement;
var r = counter + 1;
while (r < elementsObject[key].length && !refChild)
{
if (elementsObject[key][r])
{
refChild = elementsObject[key][r]._node;
}
r++;
}
if (refChild)
{
newNode = targetNode.insertBefore(
elementsObject[key][counter]._node,
refChild);
}
else
{
newNode = targetNode.appendChild(
elementsObject[key][counter]._node);
}
arguments.callee(
elementsObject[key][counter],
newNode);
newElement._elementTree = elementsObject[key][counter];
}
else
{
arguments.callee(
elementsObject[key][counter],
elementsObject[key][counter]._node);
}
}
}
}
else
{
if (elementsObject[key].length !== 0)
{
if (!elementsObject[key]._node)
{
newElement = document.createElement(key);
elementsObject[key]._node = newElement;
if (refChild)
{
newNode = targetNode.insertBefore(
elementsObject[key]._node,
refChild);
}
else
{
newNode = targetNode.appendChild(
elementsObject[key]._node);
}
arguments.callee(
elementsObject[key],
newNode);
newElement._elementTree = elementsObject;
}
else
{
arguments.callee(
elementsObject[key],
elementsObject[key]._node);
}
}
}
}
// else create the new element as targetNode.
else
{
if (!elementsObject[key]._node)
{
arguments.callee(elementsObject[key],
elementsObject[key]._node = targetNode = document.createElement(key));
}
else
{
arguments.callee(elementsObject[key],
elementsObject[key]._node);
}
}
}
}
}
}
}
return targetNode;
};
</script>
<!-- end copy sourcecode until here -->
</body>
Posted By: trevaniansin tener que poner todo este código?
<script></script>
en un archivo .js aparte y llamarlo al principio... también te ayudará a que el usuario lo cachee y no lo cargue mil veces y la página te pese menos.
Posted By: trevanianGracias por la idea, Ignatius.
Posted By: trevanianMe sorprende que con la pasta que genera Booking a través de sus afiliados no tenga un sistema más currado
Posted By: Tolosabooking que yo sepa cada vez genera menos de sus afiliados y no es su objetico por lo que no asigna recursos o los minimos .... al contrario su objetivo es su marca y eliminar al resto, para que crear competencia y hacer crecer a un afilaido si ahora puede llegar donde antes solo llegaban sus afiliados....
Posted By: ignatiusA mí también... yo creo que ha de tenerlo.
En lo más íntimo quiero chili (con carne, a poder ser :tiko:) · Especialista en tiros por la culata · No me ando con chiquitas · Gandu hu, gandu hu, garu se kaho!
Booking.com te ofrece la posibilidad de añadir una casilla de búsqueda en tu página web. Si ya cuentas con una integración de marca blanca, el estilo (colores y tipos de letra) se copiará automáticamente en la casilla de búsqueda. Si utilizas una página con el estilo de Booking.com, la casilla de búsqueda tendrá el mismo estilo que la de la página web de Booking.com.
Puedes encontrar una copia de tu casilla de búsqueda aquí:
http://www.booking.com/?aid=xxxxxx&tmpl=searchbox
El cuadro de búsqueda puede ajustarse añadiendo parámetros a la URL de arriba. Estos parámetros están en la sección "Cambiar el cuadro de búsqueda" de esta página.
Puedes insertar el cuadro de búsqueda en tu página web copiando directamente el "código fuente" del cuadro de búsqueda en tu servidor. Puedes hacerlo mostrando el cuadro de búsqueda en tu navegador, haciendo clic con el botón derecho en el cuadro de búsqueda y seleccionando "view page source".
Mostrar el código fuente:
Puedes copiar el código entre la etiqueta "" y la etiqueta "" aquí.
Please note that you load the url of the searchbox in a new window before viewing the page source
No olvides copiar el css y los archivos javascrypt desde la sección de código fuente e incluirlos en la sección de tu página web.
Posted By: Tolosabooking que yo sepa cada vez genera menos de sus afiliados y no es su objetico por lo que no asigna recursos o los minimos .... al contrario su objetivo es su marca y eliminar al resto, para que crear competencia y hacer crecer a un afilaido si ahora puede llegar donde antes solo llegaban sus afiliados....
Posted By: Tolosayo tengo un argelino que está aburrido y siempre nos mete reservas de miles de euros
Posted By: TolosaNO entiendo lo de la marca, expedia tambien tiene sus marcas igualmente reconocidas : expedia, hotels.com, hoteles.com etc..
Posted By: TolosaImportante dato es que ellos en casi el 70% es prepago y esto crea rechazo
Posted By: TolosaSobre integración me parece mas complicado el XML de expedia y bastante mas lento
Otra vez que cancelan una reserva seis días después de que el cliente saliera (en teoría) del hotel.
Posted By: Pacoya tengo dos cubatas pagados
Posted By: TolosaTreva en los dos empresas se puede cancelar y te devuelven el diner , pero una te cobra por adelantado y otra no (Post Pay, Pre Pay)
Te va a arder el pellejo
Posted By: Mafiay2kyo este mes y el de noviembre estoy a 0'sDominios en venta ( sinazucar punto com , ialquiler punto com, iapartamentos punto com )
Posted By: Mafiay2kyo este mes y el de noviembre estoy a 0's
Posted By: JCRhotelscombined.com
Posted By: Mafiay2kPoco, me ha caído a la mitad... menos de 10.000 pero antes sacaba con las mismas webs mas de 150€ mensuales. Tampoco es para tirar cohetes... pero algo esta cambiando
Posted By: JCRPrueba con hotelscombined.com. Pagan por click