0

重複の可能性:
innerHTML は FF では機能するが IE では機能しない!
IEのinnerHTML?

XAJAX 登録関数で innerHTML を使用して、SELECT タグを動的に作成しています。FIREFOX、CHROME、SAFARI では正常に機能しますが、IE では機能しません。IE でこれを機能させるために innerHTML を使用する代わりの方法はありますか? 関数のリストは次のとおりです。

function getProducts($category_sname)
 {
    global $current_item_id;
    /*** a new xajax response object ***/
    $objResponse=new xajaxResponse();
    $objResponse->script("clearOption('item_identification');");

    $category_name = substr($category_sname,1,39);
                $cat_list = Jelly::select('catmst')
                        ->select('category_identification','name')
                        ->and_where('name','=',$category_name)
                        ->deleteflag()
                        ->execute();

                foreach ($cat_list as $catl)
                {
                        $category_id = $catl->category_identification;
                }
    /*** get the item_identification data ***/
    $OL=array();
    $OL=getProductData($category_id);

    /*** set first value ***/
    $ret = '<option value="">Select One</option>';
    foreach ($OL as $value => $text)
    {
        /*** the product dropdown options ***/
    $ret .= '<option value="'.$value.'">'.$text.'</option>';
    }
    /*** assign the options to the item_identification div ***/
    $objResponse->assign('item_identification', 'innerHTML', $ret);
    return $objResponse;
 }

4

1 に答える 1

0

<select>DOMモデルの要素を処理するためのより移植性の高い方法は、 http://support.microsoft.com/kb/276228で説明されています。

于 2012-08-02T15:40:23.537 に答える