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

  • Home
  • SEARCH
  • 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 an element for my side bar navigation being called from my layouts/default.ctp
Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For
iPhone application, which has two buttons -right side- of Navigation Bar title. I want
I have made a list based navigation bar for my newest project and I
I have a side project I do = in Java. It's a pretty straight-forward
I have a 4 side convex Polygon defined by 4 points in 2D, and
I have some client side code that uploads an Outlook email to a document
I have a server side ImageButton, and a server side Button, and then a
I have some client-side validation against a text box, which only allows numbers up
In my fieldset I have labels next (side) to my textboxes, but for some

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.