Search Results

Search found 3 results on 1 pages for 'cmroanirgo'.

Page 1/1 | 1 

  • jquery ajax html response change 1.3.2 vs 1.4.2 (aka where is my script tag?)

    - by cmroanirgo
    I've been using jquery 1.3.2 to pull snippets of html (including script) from a server. A typical response might be: <div id="content"<div id="inner"... <script type=... alert("hello world");</script <pHello World</p </div</div I've been using the query .get function: $.get($(this).attr("href"), function(response) { $("#inner").replaceWith($("#inner", response)); }); And everything is fine and works as expected: the returned html snippets get loaded into the DOM and the scripts run. When I use 1.4.2 however, I notice that the script tags have been removed and no longer run. Stepping into the newer jquery codebase yields the lines of code (line 4498) : ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) ); which seems to be the culprit 'removing' the script from its happy resting place as part of the selector process. But it doesn't help me in injecting exactly what i want into the DOM. Any idea why jquery is doing this? More importantly, how can I go about fixing this so that my scripts run?

    Read the article

  • ajaxStart only called once

    - by cmroanirgo
    I'm having trouble with ajaxStart/ajaxStop. In the following code, the ajaxStart/ajaxStop code is only ever called once (the very first time). Any ideas why? var A_func = function() { $.get($(this).attr("href"), function(response) { $("#content_inner").replaceWith($("#content_inner", response)); }); return false; }; $(function() { $("A").live("click", A_func); $(document).ajaxStart(function(){$("#loading").show();alert("loading");}); $(document).ajaxStop(function(){$("#loading").hide();alert("finished");}); }); Note that the ajax requests themselves work correctly, it's just that the 'loading' icon only shows the once and then never again. My html is something like: <body> <img id="loading" width="12" height="12" src="/images/ajax-loader.gif" style="display:none" alt="loading"/> ... <div id="content"><div id="content_inner"...</div></div>... </body> I have also tried using ajaxSend/ajaxComplete and it has the same problem

    Read the article

  • SubSonic generated code and always filtering records

    - by cmroanirgo
    Hi, I have a table called "Users" that has a column called "deleted", a boolean indicating that the user is "Deleted" from the system (without actually deleting it, of course). I also have a lot of tables that have a FK to the Users.user_id column. Subsonic generates (very nicely) the code for all the foreign keys in a similar manner: public IQueryable<person> user { get { var repo=user.GetRepo(); return from items in repo.GetAll() where items.user_id == _user_id select items; } } Whilst this is good and all, is there a way to generate the code in such a way to always filter out the "Deleted" users too? In the office here, the only suggestion we can think of is to use a partial class and extend it. This is obviously a pain when there are lots and lots of classes using the User table, not to mention the fact that it's easy to inadvertently use the wrong property (User vs ActiveUser in this example): public IQueryable<User> ActiveUser { get { var repo=User.GetRepo(); return from items in repo.GetAll() where items.user_id == _user_id and items.deleted == 0 select items; } } Any ideas?

    Read the article

1