2010-10-08 28 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(); 
      } 
     ); 
     }); 

我覺得現在的問題是,統一執行時的內容還沒有加載。