Questions tagged [onbeforeload]

12 questions
5
votes
3 answers

Change src of image before request has been sent

I did a lot of research about this problem, but with no success. Essentially what I want to do is this: 1) Replace the src- attribute of all images with a placeholder, like 'blank.gif' 2) Add the HTML5 data-original attribute with the original image…
christian_fei
  • 103
  • 3
  • 10
4
votes
1 answer

Trigger onbeforeunload if form is not submitted

I've got a form which is being submitted via PHP with 3 submit actions: Save and Continue Save and Exit Exit without Saving I'd like to trigger an "OnBeforeUnload" alert to display if the user DOES NOT click on any of the form actions to advise…
pingu
  • 614
  • 1
  • 10
  • 23
3
votes
2 answers

Chrome extension - get Html DOM before load js on browser

I'm developing a chrome extension that needs to block the load of the html page, do some validations on the javascript, that cames in the page, in my content script, and proceed(or not) with the loading of the page. In my manifest with "run_at":…
2
votes
1 answer

EasyUI datagrid sends an unwanted request

I have a datagrid (table) that when created, it sends two requests: the first is an unwanted (not send by me) it has no parameters (only rows and pagination when pagination settings is active), it does go the the intended URL. the second is what…
1
vote
2 answers

Execute a function BEFORE ANY function is executed

What I want to do is to execute a function automatically every time BEFORE ANY function is executed in JS, regardless if it's a custom or native function if possible. ie. whatIWant(functionName){ return console.log('called before…
R.D.
  • 1,557
  • 2
  • 10
  • 11
1
vote
3 answers

Setting window.onbeforeunload to undefined in IE8 causes" not implemented error

if(!$('fieldset.quote-step4').hasClass('show')) { window.onbeforeunload = function() { return "Are you sure you want to leave the quote request page? This will reset the form."; } …
0
votes
0 answers

Accessing the Unit Cost field using a userevent script

On the sublist on my proposal, i have 2 lines with specific items on them that I need the script to look for and update the unit cost based on a certain percentage of a custom field on the header level. Not sure where my script is messing up. /** …
0
votes
1 answer

Looking for Scripting Help on accessing the billaddresslist

I have a script that "should" Get the customer ID from a created customer field on my form Load the customer record Remove options that are already in the 'billaddresslist' Search for addresses associated with my selected customer add each address…
0
votes
0 answers

Cypress onbeforeload fails only in console run

I get this error only when executing tests with 'npx cypress run ' when I run the same thing in windowed mode 'npx cypress open ', it works properly
LukaRls
  • 35
  • 4
0
votes
2 answers

Is it possible to detect the load of an applet?

I'm working on a Safari extension, and I'd like to detect when s are going to load (the onbeforeload event) on a page. However, there seems to be no such event for these. How should I do it? Transform all tags to tags and…
zneak
  • 134,922
  • 42
  • 253
  • 328
0
votes
1 answer

Launch code before Application creation and requirement

I have question about the best way to implement correctly my code. I have this in app.js /*** EXT LOADER ENABLE & PATH ***/ Ext.Loader.setConfig( { enabled : true, application :…
-2
votes
2 answers

Javascript function that executes when leaving page without prompting user

I'm looking for a javascript function that executes when the user leaves the page, similar to the onbeforeunload function, but I don't want the user notified with a dialog box
jaydoggy
  • 105
  • 2