onload

Recursively access iframes after they've loaded with jQuery

I've looked at the related questions here but am having a slightly different problem. I am rewriting anchors across nested iframes, sometimes 3 or 4 iframes deep. I use .load( function(){} ) to wait for each to load before accessing the anchors. This works fine when only going one iframe deep, but fails after that. Here is the code: ...

How to add a script onLoad ?

Hello, I have to add a Javascript onLoad on a tag : I have a form and I want to disable an input at load. How can I do this with symfony please ? I have to do this only for forms, so I can't add it in the tag of the layout ...

Firefox not loading jQuery plugin when entering URL

Hi guys, I'm having a very annoying issue on Firefox 3.6.8. I have this sample plugin: (function($){ $.fn.test_plugin = function(settings){ $(this).load(function(settings){ alert('ok'); }); }; })(jQuery); And at the bottom of the html page something like this: $(function(){ ...

Setting focus on an HTML input box on page load.

Hi there, I'm trying to set the default focus on an input box when the page loads (example: google). My page is very simple, yet I can't figure out how to do this. This is what I've got so far: <html> <head> <title>Password Protected Page</title> <script type="text/javascript"> function FocusOnInput() { document.getElementById("...

Everything in an IFrame Loaded event

Is there some sort of event for IFrames that only fires when every resource (script, image, stylesheet, dom) has loaded? Basically I want to have a loading graphic displayed over the IFrame and only remove that when everything is loaded inside so the user doesn't see everything loading. Currently I am using $(iframe).ready(function() { ...

Passing param to the OnLoad in aspx page from a javascript?

Hi guys, I have this javascript function myFunction(source) { window.open(source, "Title", 'width=400, height=400'); } and in c# code I call it by HtmlPage.Window.Invoke("myFunction", source); which opens up a aspx page and goes to its OnLoad function: protected override void OnLoad(System.EventArgs e) { b...

gBrowser.addEventListener: "load" event fired three times

Hi, I have installed the "hello world" dev example for Firefox extensions as described here: http://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/ I have modified the anonymous function that gets passed to gBrowser.addEventListener: gBrowser.addEventListener("load", function (event) { var t = event.target;...

.onload called multiple times from Firefox extension

I'm developing a Firefox extension and have the following code: function initialize() { // For accessing browser window from sidebar code. var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Compon...

Registering the onload event for a frame using addEventListener/attachEvent

I add an event to a frame using the inline syntax: <FRAME SRC="s.htm" NAME="WINCONTENT" onload="alert( this )"> This works (=the event fires whenever a new URL is loaded), except that I'd much rather register events using addEventListener/attachEvent. Now -- in the onload="alert( this ) example this is set to HTMLFrameElement. How...

Javascript "<body onload=...>" in Drupal

I'm trying to integrate a javascript library for drag&drop on tables into one page of my custom Drupal module. I've included the js file using drupal_add_js, but I don't know how to initialize it. The documentation for that library states that an init function should be called like <body onload="REDIPS.drag.init()"> How would I do th...

jQuery ColorBox as POP UP. No Show Images

Hello Community, I am Using Colorbox for a Pop-Up that loads when the page loads. The Pop Up Calls an ASP page with 1 Image, and 1 Button that launches a Chat Window. I got it to work on my local, but when I go remote the images dont appear (all the file paths are correct it looks like). The functionality is there and you can click on ...

onLoad Pop Up (Load only with the First Visit)

I am Using Colorbox as a Pop Up with a Chat Button that appears. How Can I make it so it only Pops up on the users 1st visit to the page? Or Maybe it Pops up every 3 Visits? Here is the Page I am Testing with: http://www.702wedding.com/weddings-in-las-vegas-pop.asp Thanks Very Much Community of Wise People. ...

Deferrable document.write

Hello, alot of web advertising providers use the old document.write method, in my case AdTech. Is it possible to overwrite the document.write method to defer after the onload event? Kind regards ...

OnLoad and OnChange (jQuery)

function safe(){ if($(this).is(':checked')){ $("select[name='sort']").attr("disabled", "disabled"); $("input[name='group']").attr("disabled", "disabled") } else { $("select[name='sort']").attr("disabled", false); $("input[name='group']").attr("disabled", false) } } $('input#safe').change(failsa...

Caching problem with asynchronous javascript loading with onload event

Hi guys, I am currently trying to load some js files asynchronously, so that they are not able to block the rest of the website. I mainly followed the descriptions found here: Asynchronous Javascript In terms of the non blocking loading of the javascript file this works great, but i got now the problem that the javascript file is cac...

Waiting for element load after page has loaded

I have a function that loads a SVG Dom from a file. Currently, it creates an embed element and places it in the document, then waits for it to load with an onload event. Apparently, however, onload isn't called for elements placed in the document after the page has loaded. Is there a way that I can register a function to be called after ...

removeChild <script> before JavaScript executes

I have a local file that I am displaying in an iframe. I cannot alter the file (or any files included- css, script, etc). I need to remove all of the tags from the file. This is easy enough, but I would like to remove them before the JavaScript inside them is executed. Simply doing: window.onload = function(){ iframeHEAD.removeChil...

Javascript - Cancel onload event

var town_imgs = $('.town_img img'); var container; var imggg town_imgs.hover(function(){ container = $('<div class="town_img_thmb">' +'<span class="thmb_container ajax2"></span>' +'</div>').appendTo($(this).parents('.town_wrapper').find('.thmb_wrapper')); var imggg = new Image...

Executing JS in dynamically loaded content

Hi All,   I've started working on a project that loads all of the different pages content dynamically. On the surface this seems simple enough, an AJAX call to a script that returns the content that is placed inside a DIV. Except that not only HTML but JS is returned as well. I'm seeing a lot of things like this:- <img src="spacer.gif"...

window.location onload in Firefox

Probably a simple question for everyone. This displays the alert with the location in Chrome and Safari but it doesn't work in Firefox <html> <head> <script type="text/javascript"> function onload() { var loc = window.location; alert("url is " +loc); return false; } </script> </head> <body onload="onload()"> </body> </html> An...