i have a button and a textarea , pressing the button should write
[code][/code], everytime the button its clicked
this is my view form add
<?php
$title = 'Add new Blog ad';
$this->headTitle($title);
?>
<?php echo $this->escapeHtml($title); ?>
<?php
$form = $this->form;
$form->setAttribute('action', $this->url('bloghome/add', array('action' =>
'add')));
$form->prepare();
echo $this->form()->openTag($form) . PHP_EOL;
echo $this->formHidden($form->get('idblogad')) . PHP_EOL;
echo $this->formHidden($form->get('identidade')) . PHP_EOL;
?>
<dl class="zend_form">
<dt><?php echo $this->formLabel($form->get('titulo')); ?></dt>
<dd><?php
echo $this->formElement($form->get('titulo'));
echo $this->formElementErrors($form->get('titulo'));
?></dd>
<dd><?php
echo $this->formElement($form->get('codebutton'));
echo $this->formElementErrors($form->get('codebutton'));
?></dd>
<dt><?php echo $this->formLabel($form->get('texto')); ?></dt>
<dd><?php
echo $this->formElement($form->get('texto'));
echo $this->formElementErrors($form->get('texto'));
?></dd>
<dd><?php
echo $this->formElement($form->get('submit'));
echo $this->formElementErrors($form->get('submit'));
?></dd>
</dl>
<?php
echo $this->form()->closeTag($form) . PHP_EOL;
?>
___________________________________
the the button in the form file
$this->add(array(
'name' => 'codebutton',
'attributes' => array(
'type' => 'button',
'class' => 'ui-button',
'value' => '[code][/code]',
'id' => 'codebutton',
'onclick'=>"myFunction()",
),
));
___________________________________
whats happening its when i click the button the first time it writes on the
textarea
but only the first time , after that when click and click nothing happens
_________
sorry
_______
thanks
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/i-have-a-button-and-a-textarea-pressing-the-button-should-write-code-code-everytime-the-button-its-cd-tp4662187.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]