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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:57:53+00:00 2026-06-14T04:57:53+00:00

I have an iframe on my first page and am redirecting the frame to

  • 0

I have an iframe on my first page and am redirecting the frame to second page on my second page I am using javascript to jump out of iframe as follow :

<script language="JavaScript" type="text/javascript">
<!--
    function breakout_of_frame() {
        if (top.location != location) {
            top.location.href = document.location.href;
        }
    }
-->
</script>

My problem is that this will make the page run several times and my code in load event will execute (say if i am sending email on load will send three times).

Now I have tried using boolean values to see when email is sent set it to true and dont send if false…but it still will not work. any suggestions to prevent this from happening?

  • 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-14T04:57:55+00:00Added an answer on June 14, 2026 at 4:57 am

    A simple, rough and ready solution:

    On your following request, append something to the query string of your request to identify the difference between the two pages.

    When you read document.location.href, parse it for the differing element and react accordingly.

    for example:

    your-domain/your-path/your-file?donealready=yes

       alert(document.location.href) //will have the parameter at the end
       //parse this to determine how to react
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a parent page that calls an iframe modal window as follows: <script
If I have a page which contains an iframe: <iframe src=blank.html id=frame></iframe> and I
I have a page where i am generating random pages using php script and
i have created a html page which contain two iframe . first iframe refer
I have a html page using javascript that gives the user the option to
I have an iframe Facebook application (using Facebook's new JavaScript API) that needs to
everyone. I'm trying to get data from some page, it's updated using javascript. First,
I have 3 iFrames on my page. The first iFrame takes up the left
i know i can have iframe in a html page, say parent.htm, and i
I have an iframe with the id of uploadtarget on my page. <iframe id=uploadTarget

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.