1. #1
    Ext User
    Join Date
    Jun 2010
    Posts
    22
    Vote Rating
    0
    ReSpawNnL is on a distinguished road

      0  

    Default Dynamicly injecting elements into the head

    Dynamicly injecting elements into the head


    Hi guys,

    I've successfully injected my elements in the head using Ext.fly and getting the head object. Now comes the trouble.
    Firefox works fine, but all Webkit based browsers refuse to execute the dynamicly injected scripts. Why? I don't know. I've got a small test.js file that only says alert('Hi!'); and even that doesn't work. Even wrapping that inside the Ext.onReady() or Ext.onReady(function(){}); doesn't do anything. Perhaps I am missing something?

    ReSpawN

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    It needs a bit more work to make it cross-platform compatible.

    The easiest solution is to include ext-3.2.1/src/ext-core/src/core/Loader.js (not part of ext-all.js) and use:
    Code:
    Ext.Loader.load(['test.js']);

  3. #3
    Ext User
    Join Date
    Jun 2010
    Posts
    22
    Vote Rating
    0
    ReSpawNnL is on a distinguished road

      0  

    Default


    Gonna try that out! I already though the option wasn't available to me just yet... Ah well, perhaps this will work! I hate to load like 10 scripts if I don't need them (eg: syntax highlighting, highlight and so forth)

Similar Threads

  1. Injecting pure HTML into ExtJS-structure?
    By an0nym in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 22 Feb 2010, 6:49 AM
  2. Injecting params for JsonWriter
    By suaveant in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 21 Jan 2010, 7:20 AM
  3. Injecting ARIA Support?
    By WeirdAl in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 16 Dec 2009, 6:55 AM
  4. wrap my head around 'this'
    By mjlecomte in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 19 Nov 2007, 11:00 AM

Thread Participants: 1

Tags for this Thread