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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:54:49+00:00 2026-06-17T21:54:49+00:00

Noob here… attempting to display an iframe inside of a javascript popup upon a

  • 0

Noob here… attempting to display an iframe inside of a javascript popup upon a user’s exit. The iframe should be seen first (within the browser prompt) and should allow the user to submit their email address.

I’ve had some success referencing this idea, but realized the iframe is only displayed after the user has elected to stay on the page. Here’s what I’d like to do with the code:

function PopIt() { 
    $("a#trigger").trigger('click');
    window.onbeforeunload = UnPopIt;
    return <iframe src="http://moneymappress.com/pro/su/pop_signup2.html">Your Browser doesn't support iframes</iframe>; 
}

After reading up on some of the security issues with iframes and javascript it appears this could be an issue, but I wanted to get a second opinion. I’m, also aware the code wouldn’t work as is, but figured it was the easiest way to communicate

If it’s the case that an iframe can’t be displayed with, what would the next best option be?

Thanks for your help!

  • 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-06-17T21:54:50+00:00Added an answer on June 17, 2026 at 9:54 pm

    You can’t do this with the onbeforeunload:

    window.onbeforeunload = funcRef
    
    • funcRef is a reference to a function or a function expression

    • The function should assign a string value to the returnValue property of the Event object and return the same string

    Notes

    • When this event returns a non-void value, the user is prompted to confirm the page unload. In most browsers, the return value of the
      event is displayed in this dialog.

    So that’s the reason that on the example you’ve referenced the prompt is shown first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Total noob here with javascript. I'm trying to alter a function. This is the
Total noob here. This is my first c# attempt, its a console application that
Noob here - I'm working on a simple Javascript calculator, and I'm using lists
Javascript noob here (I'm assuming I will need Javascript to solve this). I need
Groovy noob here, I'm working through my first Groovy book and it has example
C++ noob here wonding how i can authenticate a Windows User via Java servlet.
Javascript noob here.... I am trying to build a site that will help my
Javascript/JQuery noob here, so apologies. I'm using .ajax to get a JSON object then
MySQL noob here; looked around first but couldn't find the answer to this question.
Grails noob here... How do I get the state name inside a Grails webflow

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.