Note that there are some explanatory texts on larger screens.

plurals
  1. POContent rendering after javascript - Zend
    primarykey
    data
    text
    <p>I can't perform any js function fired by a dijit event unless setting the javascript file in the view itself.</p> <p>I set various js files to use within my controller this way :</p> <pre><code>$layout = Zend_Layout::getMvcInstance(); $view = $layout-&gt;getView(); $view-&gt;headScript() -&gt;appendFile('/public/js/jquery-1.5.1.min.js', 'text/javascript') -&gt;appendFile('/public/js/jquery-ui-1.8.13.custom.min.js', 'text/javascript') ... -&gt;appendFile('/public/js/functions.js', 'text/javascript'); </code></pre> <p>which are echoed in the layout :</p> <pre><code>echo $this-&gt;headScript(); </code></pre> <blockquote> <p>note : all of them are loaded</p> </blockquote> <p>But when my view is rendered The events bound to the dijits elements don't fire the functions in functions.js</p> <p>For example I have this dijit element :</p> <pre><code>$business = new Zend_Dojo_Form_Element_FilteringSelect('business'); $business -&gt;setLabel("Etablissement :") -&gt; setStoreId('businessStore') -&gt; setStoreType('dojo.data.ItemFileReadStore') -&gt; setStoreParams(array('url' =&gt; '/public/business/getbusinesses?all=true&amp;')) -&gt; setAttrib('searchAttr', 'nom') -&gt; setAttrib('onchange',"cB()") -&gt; setRequired(true) -&gt; setValue('business'); </code></pre> <p>and the js function :</p> <pre><code>function cB() { alert("changed"); } </code></pre> <p>But even if I wrap cB() like this it doesn't work :</p> <pre><code>$(document).ready(function() { function cB() { alert("changed"); } }); </code></pre> <p>Do somone has an idea ? I'm stuck with this javascript issue all over my Zend application =(</p> <p>thanks !</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload