Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.  
  5. <meta charset="ISO-8859-1">
  6.  
  7. <title>Mitunes</title>
  8.  
  9. <style type = "text/css">
  10.  
  11. table{
  12. width : 100%
  13. }
  14.  
  15. iframe{
  16. width : 100%
  17. }
  18. </style>
  19.  
  20. <script type="text/javascript">
  21. function createBrandList(){
  22. var html= "";
  23.  
  24. html += "<select size'8' onchange=
  25.  
  26. for(var i=0; i<auto_demo.length; i++){
  27. html += "<option>";
  28. html += auto_demo[i].brand
  29. html += "</option>"
  30. }
  31.  
  32. html += "</select>";
  33.  
  34. writeIframe("brand_list_frame",html);
  35. }
  36.  
  37. function createModelList(brand_index){
  38. var html = "";
  39.  
  40. html += "<select size='8' onchange='parent.createModelInfo("+brand_index+", this.selectedIndex);'>
  41.  
  42. for(var i=0; i<auto_demo[brand_index].model.length; i++){
  43. html += "<option>";
  44. html += auto_demo[brand_index].model[i];
  45. html += "</option>"
  46. }
  47.  
  48. html += "</select>";
  49.  
  50. writeIframe("model_list_frame", html);
  51. }
  52.  
  53. function createModelInfo(brand_index,model_index){
  54. var html = "";
  55.  
  56. html += "You have selected brand: "+ auto_demo[brand.index].brand;
  57. html += "<br>You have selected model: "+ auto_demo[brand.index].model[model_index];
  58.  
  59. writeIframe("model_infor_frame",html);
  60.  
  61. }
  62.  
  63. function writeIframe(id,html){
  64. with(document.getElementById(id).contentDocument){
  65. open();
  66. write(html);
  67. close();
  68. }
  69. }
  70.  
  71. </script>
  72. <script type="text/javascript" src="C:/Users/Shannon/Downloads/MiTunes/music.js" /></script>
  73. </head>
  74. <body>
  75. <table>
  76. <tr>
  77. <td> <iframe> id = "brand_list_frame"</iframe></td>
  78. <td> <iframe> id = "model_list_frame"</iframe></td>
  79. <td> <iframe> id = "model_infor_frame"</iframe></td>
  80. </tr>
  81. <tr>
  82. <td colspan="3"> <iframe> </iframe></td>
  83. </tr>
  84. </table>
  85. </body>
  86. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement