Form:

<form>
   <button>Add tr to table</button>
   <table>
      <thead>...</thead>
      <tbody>
         <tr>...</tr>
         ...PlaceHolder...
      <tbody>
   </table>
</form>

Module code: (buttton form and AHAH function)

     $form['add']=array(
        '#type'=>'button',
        '#value'=>'Add Element',
		'#ahah'=>array(
			'path'=>'nodechild_add_elem',
			'method' => 'append',
                         'wrapper'=>'nodechild_table tbody'
		),
	);
function module_nodechild_add_elem(){
    $output = '<tr>...</tr>';
    drupal_json(array('status'=>'TRUE','data'=>$output));
}

Result:

<form>
   <button>Add tr to table</button>
   <table>
      <thead>...</thead>
      <tbody>
         <tr>...</tr>
         <div>  // -- unnecessary div
               <tr>(output from ahah)</tr>
         </div>
      <tbody>
   </table>
</form>

How i can remove this 'div' element?

Comments

divined’s picture

Issue summary: View changes

miss

divined’s picture

Issue summary: View changes

mis

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.