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

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -