<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.0">
</HEAD>
<BODY>
Hi Brian<BR>
Have a look at how filefield does it:<BR>
<A HREF="http://api.drupalecommerce.org/api/function/filefield_js/6">http://api.drupalecommerce.org/api/function/filefield_js/6</A><BR>
The bit towards the end of the function that adds a script tag to the response.<BR>
Lee<BR>
On Wed, 2010-09-22 at 16:29 -0400, Brian Vuyk wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On 10-09-22 03:56 PM, Brian Vuyk wrote:
> Hi all.
>
> I am working on modifying a node form to allow a user to progressively
> select down through a taxonomy tree, and when they have a final term
> selected, update the advanced view arguments for a view-backed
> nodereference field.
>
> I am using AHAH, so that as the user selects a term, the next set of
> potential sub terms will show, in a somewhat similar fashion to how
> Taxonomy Select works.
>
> However, the new select form elements I pull in via AHAH also have
> ['#ahah'] attributes themselves. As far as I can tell, the AHAH code
> doesn't seem to trigger for elements that were themselves brought into
> the form via AHAH.
>
> According to <A HREF="http://drupal.org/node/337941">http://drupal.org/node/337941</A>, you can get an array from
> drupal_add_js(NULL, NULL, 'header'); which you can in turn pass on to
> drupal_json() in order to attach the AHAH behaviours to elements
> pulled in via AHAH. However, I have tried this with no results.
>
> I would appreciate it very much if someone could take a look, and
> hopefully tell me where I've gone wrong, or what I have to do to get
> AHAH to work on the elements I am pulling in. You can view a copy of
> the module as it current stands at <A HREF="http://drupalbin.com/16170">http://drupalbin.com/16170</A>.
>
> Thanks,
>
> Brian
Just a side note, it appears that you get a 404 from drupalbin if you
use the above URL. Try this instead:
<A HREF="http://drupalbin.com/16170?nocache=1">http://drupalbin.com/16170?nocache=1</A>
Thanks!
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>