javascript - Two same instances created with page refresh in moodle -


i calling ajax function moodle block when onchange event detected. sends courseid server page , returns necessary fields updates div inside block. dropdown has onchange event generated database call. problem is, when adding block in moodle page, page refreshed , see 2 instances of block. reason?

update

the structure of code following;

<script></script>   <?php      ?> 

from inside php block calling javascript function parameters. changing div of php block. javascript sending parameters php page wrote db queries. when changed code following, error gone:

 <?php     script written inside $this->content->text   ?> 

can shed light on reason?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -