Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7420357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:13:26+00:00 2026-05-29T08:13:26+00:00

I´m developing a simple form that allows users to check availability in a hotel

  • 0
  • I´m developing a simple form that allows users to check availability in a hotel for specific dates.
  • When a user clicks the “Book Now” button, a new page will load (the booking engine) showing the availability.
  • The booking mask will be used within an iFrame on a Facebook Page.

I´d like to load the new page in a new browser window/tab (depending on the user´s settings).

At the moment I´m using window.top.location.href to open the new window. This works to break out of the iframe, but not to open a new tab/window.

Do you have any suggestions?

This is the code I´m using in it´s most basic form:

// The event: 
<input type="button" value="Book now" onClick="do_action();" />

// The function: 
function do_action() {
  baseURL = "http://www.bookingengine.com;"
  var1 = "parameter1;"
  var2 = "parameter2;"
  var3 = "parameter3;"
  window.top.location.href = baseURL+ var1 + var2 + var3; 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:13:27+00:00Added an answer on May 29, 2026 at 8:13 am

    Just had the same issue, can´t believe I didn´t think of this solution when I asked this question. Anyway, for future reference here´s how to open a new window (following the above example):

     window.open(baseURL+var1+var2+var3) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a simple web apps that allowed user to key in information
I'm developing a custom module for Drupal 6, that creates a simple form. My
I am developing a simple page with a form. When I put a input
I am currently developing a C# Windows Form Application that I intend to let
I'm developing a simple protocol that is used to read/write integer values from/to a
I am developing a simple software in .NET C# for blind people that includes
I'm developing a C# application and when the user clicks on the X, the
I am developing my first simple website using PHP. Now, I am working in
I'm developing a webapp that allows the editing of records. There is a possibility
I'm developing a simple servlet that should serve documents via http. I use URLs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.