English 中文(简体)
CakePHP * E/CN.6/2009/1。
原标题:CakePHP onChange event

我不知道为什么这一<代码>onChange活动没有奏效。 也许我这样说,我可以看一看我的错误。 我感谢您的帮助:

<td class="cellInput">
  <?php
    $options = array( 200 => 200 ,  500 => 500 ,  1000 => 1000 ,  2000 => 2000 ,  5000 => 5000 ,  Outro => Outro );
    $attributes = array( legend  => false);

    echo $form->select( capacidade , $options, array(
       class  =>   ,
       label  =>   ,
       default  =>  200 ,
       onchange  => "javascript:checkForOther(this);",
    )); 
  ?>
</td>
问题回答

其他人建议,将属性置于正确的参数位置。 另一件事是删除java书写器,在那里只有功能名称,例如:

From: onchange => "javascript:checkForOther(this);"

To: onchange => “checkFor Other(this)”

提 出

  1. 将属性作为第四点而不是第三点:

    echo $form->select( capacidade , $options, null, 
        array(
             class =>  
            , label  =>   
            , default  =>  200 
            , onchange  => "javascript:checkForOther(this);"
        )
    );
    
  2. Does the source of the generated page have the onChange attribute?

  3. See the documentation

http://book.cakephp。 关于选定方法的文件,第三种论点用于选择哪一种选择是缺席选择的。

您必须利用第四项论点将超文本属性通过<条码>。 内容:

<td class="cellInput">
  <?php
  $options = array( 200 => 200 ,  500 => 500 ,  1000 => 1000 ,  2000 => 2000 ,  5000 => 5000 ,  Outro => Outro );
  $attributes = array( legend =>false);
  echo $form->select( capacidade , $options,  200 , array( class =>   ,  label  =>   ,  onchange  => "checkForOther(this);")); 
  ?>
</td>




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签