MrHackett / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

[PATCH] Dynamically load script when panel is loaded #128

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I wanted to dynamically load a script when a specific panel loaded.

Usage: <ul script="sample.js">

Patch was made against 0.20-beta1

Please bear in mind, there is a slight delay as to when the script is
loaded, as the browser loads the script asynchronously.

Original issue reported on code.google.com by cwzach...@adelphia.net on 29 Apr 2009 at 12:45

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by msgilli...@gmail.com on 30 Apr 2009 at 11:02

GoogleCodeExporter commented 8 years ago
I haven't been able to get this working.
My script.js file contains

function code(){
alert(" HELLO ");
}

window.onload=code();

Has anyone else tested this successfully?

Original comment by lictor4@gmail.com on 27 May 2009 at 4:12

GoogleCodeExporter commented 8 years ago

Original comment by msgilli...@gmail.com on 7 Aug 2009 at 10:08

GoogleCodeExporter commented 8 years ago
I dont think this works because i cannot seem to find a "loadScript" (loadScript
(page.getAttribute("script"));) function anywhere in the iUI js file. :-(

Original comment by az...@hotmail.com on 17 Sep 2009 at 4:58

GoogleCodeExporter commented 8 years ago
I've created an extension in the "sandbox" that is inspired by this patch and 
also includes functionality from the 
patch for Issue #102.  It uses the "events" feature of iUI 0.40.

Original comment by msgilli...@gmail.com on 10 Feb 2010 at 11:30