[support] File field and AHAH button not working together
Austin Einter
austin.einter at gmail.com
Fri Apr 1 00:24:10 UTC 2011
It is resolved.
I referred http://drupal.org/node/399676
Instead of using "drupal_json(array('status' => TRUE, 'data' => $output));"
, need to use " print drupal_to_js ( array ( 'status' => TRUE, 'data' =>
$output ) ); exit ".
Thanks
Austin
On Fri, Apr 1, 2011 at 5:17 AM, Austin Einter <austin.einter at gmail.com>wrote:
> Hi All
> I am using Drupal 6.20.
>
> In a form I have a file field as below.
>
> * $form['work']['resume'] = array(
> '#type' => 'file',
> '#title' => "Upload Resume",
> '#description' => 'Browse and select your resume.',
> '#required' => FALSE,
> '#size' => 50,
> );*
>
> I have a AHAH button in (in a different division)
>
> * $form['skill_set_wrapper']['allskills']['moreskill'] = array(
> '#type' => 'button',
> '#value' => t('Add / Remove Domain, Skills'),
> '#weight' => 1,
> '#ahah' => array(
> 'path' => 'resume_submit/form/moreskills',
> 'wrapper' => 'all-skills',
> 'method' => 'replace',
> ),
> );*
>
> In addition to that I have number of fields in my form.
> If I *do not* browse and slect a file for "file" field, then AHAH button
> works fine (I can add multiple rows for skill add).
> If I browse and slect a file for "file" field, then on clicking AHAH
> button, I get a File download dialog asking "Do you want to save this file
> or find a program online to open it".
>
> Did anybody face this issue previouly. What is the workout to avaoid the
> file download dialog.
>
> Regards
> Austin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110401/9f2c5622/attachment.html
More information about the support
mailing list