This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Fatal error: Call to undefined function remote_function()

Notes and reports about symfony 1.0.x stable

Fatal error: Call to undefined function remote_function()

by fishlurch » Tue Jan 04, 2011 3:23 pm

Hi @ all,


I want to use the remote_function in a template in this way:

Code: Select all
<td class="form_input">
    <?php echo form_error('citizen{add_country}') ?>
    <?php echo object_select_tag($citizen, 'getAddCountry', array (
  'related_class' => 'SupportedCountries',
  'include_blank' => true,
  'control_name' => 'citizen[add_country]',
  'onChange' => remote_function(array(
    'update' => 'dynState',
    'with' => "'id='+value",
    'url' => 'getCompCont',
    'script' => true
    )) 
   )) ?>
    </td>


The box which should be updated is:

Code: Select all
<div id="dynState">
    <?php echo object_select_tag($citizen, 'getAddState', array (
  'related_class' => 'SupportedStates',
  //'peer_method' => 'getMatchingStates',
  'include_blank' => true,
  'control_name' => 'citizen[add_state]'
)) ?></div>


But the above error is returned. Any idea how to solve this? I use symfony 1.0

Thanks and greez
Steffen
fishlurch
Junior Member
 
Posts: 9
Joined: Mon Dec 06, 2010 8:47 pm

Re: Fatal error: Call to undefined function remote_function(

by fishlurch » Tue Jan 04, 2011 4:08 pm

have never been such an idiot! Solution is:

Code: Select all
<?php use_helper('Javascript')?>


at the beginning of the document!
fishlurch
Junior Member
 
Posts: 9
Joined: Mon Dec 06, 2010 8:47 pm