The code in extlink.js runs only once during the $(document).ready() event, which means that any links that are thereafter generated using Ajax are not processed. One suggestion I would have to fix this would be to also run the code during an ajaxStop() event.

Comments

svihel’s picture

any news about this issue?

quicksketch’s picture

This has been corrected in the Drupal 6 version (which now utilizes Drupal behaviors), but I haven't released a new stable release that includes the changes yet. See #306609: External link in a table display, using Views and Ajax.

svihel’s picture

So future patch for version 5.x isnt likely to come out?

quicksketch’s picture

I just made another commit to both Drupal 5 and 6 that increased consistency between the two modules and gets as close as we can to supporting Drupal 5.

Because Drupal 5 has no central repository of JS actions that have been applied to the page, it's not possible to have an "automatic" solution like Drupal 6, however, the change I made makes it at least easier to reattach the extlink functionality. I've created a "extlinkAttach" function that will add the extlink functionality to a section of the page.

An example of how you might do this would be something similar to:

$.get('http://mysite/something', function(result) {
  $result = $(result).appendTo('#somediv');
  extlinkAttach($result.get(0));
});

Ofcourse you'll need to tweak this to your particular situation.

quicksketch’s picture

Status: Active » Closed (won't fix)

Moving this particular request to won't fix, since it's beyond the abilities of External Links to make this any easier in Drupal 5.

dboulet’s picture

Version: 5.x-1.6 » 5.x-1.x-dev

My solution to this problem is to run the script on the entire document on every ajaxStop() event. I can do this by adding the following javascript code to the page:

$().ajaxStop(function(evt, request, settings) {
  extlinkAttach(document);
 });

I know this solution isn't ideal, since every link on the page gets reprocessed every time an ajax request occurs, but it gives me an automatic solution which doesn't require me to modify any other module's code.