2010-10-08 3 views
0

у меня есть этот сайт структуру:форма, стиль изменения в другом файле

Первая страница:

<script src="../jquery.uniform.min.js" type="text/javascript" charset="utf-8"></script> 
    <script type="text/javascript" charset="utf-8"> 
     $(function(){ 
     $("input, textarea, select, button").uniform(); 

     $("#show_image_error").load("adv_dell_img_err.html?id="+ Math.random()); 
     }); 
    </script> 
    <link rel="stylesheet" href="../css/uniform.default.css" type="text/css" media="screen"> 
    </head> 
    <body> 
    In first page:<br/> 
    <select> 
     <option>Through Google</option> 
     <option>Through Twitter</option> 
     <option>Other&hellip;</option> 
    </select> 
    <div id = "show_image_error">load file ...</div> 

adv_dell_img_err.html файл:

File 2 
//get data from DB ... 
<select> 
    <option>Through Google</option> 
    <option>Through Twitter</option> 
    <option>Other&hellip;</option> 
</select> 

Почему равномерна в adv_dell_img_err.html не работа? Как их исправить?

Благодаря

ответ

1

Попробуйте изменить это:

$(function(){ 
     $("input, textarea, select, button").uniform(); 

     $("#show_image_error").load("adv_dell_img_err.html?id="+ Math.random()); 
     }); 

к этому:

 $(function(){ 
     $("#show_image_error").load(
      "adv_dell_img_err.html?id="+ Math.random(), 
      function(responseText, textStatus, XMLHttpRequest) { 
       $("input, textarea, select, button").uniform(); 
      } 
     ); 
     }); 

Я думаю, что проблема заключается в том, что, когда равномерная выполняет содержимое еще не загружено.

 Смежные вопросы

  • Нет связанных вопросов^_^