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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:56:05+00:00 2026-06-05T15:56:05+00:00

I am using a bookmarklet to inject an iframe into another website, and am

  • 0

I am using a bookmarklet to inject an iframe into another website, and am trying to post data back to my server when any forms on the page are submitted. Unfortunately, the AJAX request inside the iframe doesn’t always complete before the browser drops all connections as part of navigation. How can I reliably send data back to my server during the onsubmit?

I’ve attempted:

  • onbeforeunload – isn’t firing after the form’s onsubmit event
  • onbeforeunload seems to prevent background javascript events while it’s active
  • Making the AJAX request synchronous – did not help, possibly because the request starts during the unload itself
  • onunload – does fire, after the request, but doesn’t seem to have any authority to slow navigation for the AJAX

I am worried about trying to:

  • break the form submission, as there might be javascript run on submission
  • create a browser extension, due to unknown risks and possible schedule overrun
  • directly run the request from the parent – the request is part of an in house library running on top of JQuery, and hacking around it would be fragile

In all cases the browser that I am targeting is Google Chrome (latest release).

  • 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-05T15:56:07+00:00Added an answer on June 5, 2026 at 3:56 pm

    I ended up spawning popunder windows instead of using AJAX requests, and pulling my data from GET parameters. The response to the browser is a HTML page with a script tag in the head containing window.close(). This seems to be working for the time being.

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

Sidebar

Related Questions

I have an iframe I put on a page using a bookmarklet, I want
I'd like to inject jQuery into a page using the Google AJAX Libraries API,
I've created a javascript bookmarklet that gets the current page's title and URL, using
Using javascript I'm trying to load images not on the current page (from an
I'm using the jQueryify bookmarklet on a page so that I can call jQuery
I have a bookmarklet that loads a div into a current page and places
I'm trying to write a bookmarklet to change the action of all forms on
I'm using KRL to inject elements into twitter timeline statuses similar to Jesse Stay's
I am trying to build an iPhone web application using ASP.NET. The page is
How do I reload the current web page using a bookmarklet? I am looking

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.