...

View Full Version : Adding an onLoad trigger to an iFrame



TheOne(AKA:T1)
02-07-2006, 10:06 PM
I've got this:

var iframe = document.createElement("iframe");
I whant to add an onLoad event that trigger the function "qwerty()"
i tryed:

iframe.onLoad("qwerty();")
But...
ERROR! :mad:
any one can help me?

glenngv
02-08-2006, 11:40 AM
iframe.onload = qwerty;
Or if the onload handler has parameters:

iframe.onload = function(){qwerty(param1, param2)};
Watch the case of onload, it should not be onLoad.

TheOne(AKA:T1)
02-08-2006, 04:43 PM
Ah, thanks, You've got that award for something no? jaja



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum