1. #1
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    23
    Vote Rating
    0
    RobbyRacoon is on a distinguished road

      0  

    Prototype adapter does not allow executing script in dynamically loaded ContentPanels

    Prototype adapter does not allow executing script in dynamically loaded ContentPanels


    Well, I can confirm it The Prototype adapter is borked in 1.0

    Using the BorderLayout (I was using /ext-1.0/examples/layout/complex.html to test with), loading a ContentPanel dynamically with something like this:
    PHP Code:
    Ext.Element.get(id).getUpdateManager().update({url:"/ext-1.0/examples/layout/test.html"scripts:true}); 
    (or any of the other methods I've tried) to load a page that looks like this:
    HTML Code:
    <div class="navContent">
        <p onclick="alert('wth!  Inline script works fine...');">Now is the time for all good men to come to the aid of their country</p>
    <script type='text/javascript'>
        alert( "...but script in a <Script> tag does not run" );
    </script>
    </div>
    Using the prototype adapter the script inside the < script> block will not run, but making no other changes to complex.html except for switching the prototype adapter for the YUI adapter the script inside the < script> block will run when loaded.

    Here are the includes I am using for the adapters, paths verified 1,000 times and known to be good
    yui
    HTML Code:
    <script type="text/javascript" src="/ext-1.0/adapter/yui/yui-utilities.js"></script>
    <script type="text/javascript" src="/ext-1.0/adapter/yui/ext-yui-adapter.js"></script>
    prototype
    HTML Code:
    <script type="text/javascript" src="/ext-1.0/adapter/prototype/prototype.js"></script>
    <script type="text/javascript" src="/ext-1.0/adapter/prototype/scriptaculous.js?load=effects"></script><!--copied-->
    <script type="text/javascript" src="/ext-1.0/adapter/prototype/ext-prototype-adapter.js"></script>


    .
    Last edited by RobbyRacoon; 23 Apr 2007 at 8:57 AM. Reason: formatting

  2. #2
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    23
    Vote Rating
    0
    RobbyRacoon is on a distinguished road

      0  

    Default


    Ugh... Apparently prototype itself is the problem, since even using something like this:
    PHP Code:
    new Ajax.Updater('targetDivID''test.php', { method'get' }); 
    Results in all < script> blocks in the test.php file being stripped. What a pain!!!

    According to the page at http://www.prototypejs.org/api/ajax/updater it is well known (and a conscious decision maybe?) that the script blocks are stripped from the Ajax response. Scroll down to About evalScripts and defining functions to see what I mean :/


    .

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I can't see a reason to use the prototype-adapter. From what I've heard, prototype is well dodgy. The YUI classes upon which the yui-adapter builds are very robust.

  4. #4
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    23
    Vote Rating
    0
    RobbyRacoon is on a distinguished road

      0  

    Default


    heh. Well, though I might agree with you now that I've gotten to this point, I had not had any problems with it long enough to get a pretty significant portion of my project done

    So now I've refactored everything to use JQuery (path of least least divergence), and everything seems to be going well for the most part. I will look into YUI after I get this project done, since this current project is comparitively small in scope and is well under way.

    Oh.... Yeah... by the way.....

    Ext JS Rocks!

  5. #5
    Sencha - Training Team RWaters's Avatar
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    714
    Vote Rating
    0
    RWaters is on a distinguished road

      0  

    Default


    Wow... and I thought I was going crazy... I ran into this issue and fussed around every which way I could to try and get those scripts to run.

    I just stripped out all the YUI code from my rails app a little while back and this mysteriously broke, I guess I'll have to put YUI or jQuery back in then

  6. #6
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    I saw this the other day, maybe you'll find it useful

    http://yehudakatz.com/2007/05/17/jqu...resh-approach/

  7. #7
    Ext User
    Join Date
    Apr 2007
    Posts
    2
    Vote Rating
    0
    Taz416 is on a distinguished road

      0  

    Default Comments and Thanks

    Comments and Thanks


    I have been experimenting with Ext for a little while now and trolling the forums for info. I am one who usually searches the ends of the earth before wasting someone's time with a question that has been asked and answered so many times before. And i also believe that you gotta get dirty and "read, read, read" to learn.

    I must say that the level of support to the community and the value of this product is awe inspiring to say the least.

    For my part though, I would have saved a lot of time if I would have found this thread a long time ago. I was using Prototype until now. My whole project depends upon the scripts being parsed in for Ajax loads. I really think there should be a sticky on this.

    Again thanks very much for your hard work. I'm sure I will be a "REAL" supporter very soon.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar