jquery append doesn't work with CakePHP's JsHelper -


i want dinamically append form elements using cakephp's form helper.

what missing?

<script type="text/javascript"> $("a#megyeadd").click(function(){ $("div#morecounty").append( <?php echo $this->form->input('colleaguescounty.1.county_id',array('label' => 'megye')); ?> ); }); </script> 

you're missing quotes on .append parameter.

$("div#morecounty").append("<?php echo $this->form->input('colleaguescounty.1.county_id',array('label' => 'megye')); ?>"); 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -