ahah

bootstrapping AHAH without full page load

I've written some modal box functionality that loads HTML into the DOM as snippets. This includes AHAH-enabled forms. I've got as far as pulling out the AHAH settings, and can re-initialize: jQuery.extend( Drupal.settings, response.setting ); I can also re-initialize: Drupal.attachBehaviors( container ); I've even ensured that aha...

Why won't Drupal AHAH forms work within a block?

I'm trying to get an AJAX-submitted (AHAH) form working to display in a block on the sidebar. For testing purposes, I'm using an example module called "Poof" from the Pro Drupal Development book: http://books.google.com/books?id=VmZrdGuBZCMC&lpg=PA269&ots=cnHiYG6kXn&dq=pro%20drupal%20development%20poof&pg=PA269#v=onepage&...

Drupal 6 AHAH / AJAX Form Submission

Hey there, I'm building a custom module in Drupal 6 which display a block with a form and some other elements like text and images. When it's submitted, using AHAH, some logic takes place in PHP and then the result is passed to JQuery which will update the elements in the block. Mainly a few images and some text. I can't wrap my he...

Any alternate of drupal_json for non-JSON output

In an AJAX call back in drupal it is normally recommended to use drupal_json() to send data to client. This function converts the raw data into JSON along with HTML encoding. I want to send the HTML data without encoding to client. for this I am using following code: print $html_output; exit(0); Is there any recommended or best way i...

AJAX v/s IFrame

Hi all, I am loading a pure HTML code from a AJAX get request and appends it into a div using JQuery. In IE this process is quite slow. I used several method to speed this up but it does not have a major impact on IE. So alternative is to load this content via IFrame. Iframe is rendered by browser and hence can be faster as compared t...

How do I get Drupal to add AHAH behaviour to a form element that is returned via AHAH?

So here's what I'm trying to do: 1. I create and render the following form element: $form['rb_download_' . $doc_id] = array( '#type' => 'submit', '#name' => 'doc_' . $doc_id, '#prefix' => "<div id='rb_doc_order_{$doc_id}'>", '#suffix' => '</div>', '#value' =>variable_get('rb_order_button', "buyOnline")...

Javascript Not Executing In Dynamically Loading Content (AHAH)

I'm dynamically loading content into a div when the user clicks a link using this code: function ahah(url, target) { document.getElementById(target).innerHTML = 'Opening form...'; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } ...

handling the display of choices in dependent select elements, in html

Hi guys! Firstly, I am sorry, i just can't seem to phrase my question well. Setup: I am using Drupal to build this location-based application. i have a form which allows the user to select his/her location. the form has 3 'dependent' select elements e.g. country, city, state. they are dependent in such a way, that selecting a partic...

Drupal form autocompleted with data from a database by ahah, how to do it?

I'm trying to do it for hours now, and I just can't do it. What I want is: A radio or select drop-down with varying options (from the database). This part is ok, it's just a query and building the options. Then there are 3 text fields, each option from the above form has data for these 3 text fields. When the user clicks/selects one ...