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 837789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:11:58+00:00 2026-05-15T05:11:58+00:00

I have a side navigation bar and when you click the links it submits

  • 0

I have a side navigation bar and when you click the links it submits a form. The forms action opens another page ( target _blank). My problem is I have to open a popup window before this blank page opens and keep it open long enough for the user to read it or atleast see it first and close it if they wish. I created a function that opens the popup on the onclick event of the link. Looks like this:

 <li><a href="JavaScript:document.quoteform.submit()" onclick="popUp('ag_popup.html')">Submit a Deal</a></li>

and my function looks like this:

function popUp(url) 
{
leftPos = 0
topPos = 0
if (screen) {
leftPos = (screen.width / 2) - 150
topPos = (screen.height / 2) - 250
}   
newwindow=window.open(url,'name','height=300,width=500,left='+leftPos+',top='+topPos);
if (window.focus) {newwindow.focus()}
return false;}

Does anyone know if I can just keep my popup open and focused without my new blank page opening up infront of it?

Cheers

  • 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-15T05:11:59+00:00Added an answer on May 15, 2026 at 5:11 am

    You could use the setTimeout-Function to wait, hold the reference on the popup and close it then(or let the user decide!). After that submit the form from that function.

    For example:

    var newWindow=null;
    function popUp(url) 
    {
    leftPos = 0
    topPos = 0
    if (screen) {
    leftPos = (screen.width / 2) - 150
    topPos = (screen.height / 2) - 250
    }   
    newWindow=window.open(url,'name','height=300,width=500,left='+leftPos+',top='+topPos);
    if (window.focus) {newWindow.focus()}
    setTimeout('closePopupAndSubmit()')', 5000);
    }
    
    function closePopupAndSubmit{
    if(newWindow != null){
    newWindow.close();
    document.quoteform.submit();
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a HTML web page. The left side bar has come links for
I have an element for my side bar navigation being called from my layouts/default.ctp
I have made a functional CSS navigation-bar, except for some fugly CSS side-effects --
I have a navigation bar at the top of a page. In FF and
I have two columns, the left side div is a navigation bar and it
I have added a few buttons to the right side of the navigation bar
I have a navigation bar that I include using SSI in every page of
I have a sidebar navigation that lists blog entry titles down the side of
Hi I need to set the button on right side, in navigation bar, programatically
I've added a navigation bar to a UIViewController. It is displayed from another UIViewController

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.