Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 26th, 2012  |  syntax: None  |  size: 1.29 KB  |  hits: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!-- load markup: -->
  2. <script type="text/javascript" language="javascript" src="lib/js/tools.js"></script>
  3.  
  4. <!-- select/div markup: -->
  5. <select name="faq">
  6.   <option value="0" onclick="faq_sel(this.value);">Please select a question/issue from the dropdown menu:</option>
  7.   <option value="a" onclick="faq_sel(this.value);">Clicking the 'Download' link launches my media player.</option>
  8.   <option value="b" onclick="faq_sel(this.value);">The video won't play in my media player after downloading.</option>
  9. </select>
  10. <div class="ans" id="a" style="display:none;">Instead, right-click the link and select "Save target as..." (Internet Explorer) or "Save Link As..." (Firefox).</div>
  11. <div class="ans" id="b" style="display:none;">You don't have the H.264 codec, which can be found packaged within the <a href="http://www.codecguide.com/download_kl.htm" target="_blank">K-Lite codec pack</a>. Alternatively, you can install/use <a href="http://www.videolan.org/vlc/" target="_blank">VLC media player</a>.</div>
  12.  
  13. <!-- tools.js: -->
  14. function faq_sel($q) {
  15.   hide_all();
  16.   document.getElementById($q).style.display = '';
  17. }
  18.  
  19. function hide_all() {
  20.   var $divs = document.getElementsByTagName('div');
  21.   for ($i = 0; $i < $divs.length; $i++) {
  22.     if ($divs[$i].className == 'ans') {
  23.       $divs[$i].style.display = 'none';
  24.     }
  25.   }
  26. }