SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2006
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    el.src = bu.value; // <embed src=

    When I click the radio button, music don't change. What can I do? Thanks...
    Code:
     
    <script type="text/javascript">
    function change(bu) {
    var el = document.getElementById('embedid');
    el.src = bu.value;
    }
    </script>
    <input type="radio" value="gonul-nedir-bilene.mp3" id="r4" name="rad" onclick="change(this)">G&#246;n&#252;l nedir bilene</br>
    <embed src="sazlar-calinir-camlicanin.mp3" id="embedid" >
    If I write
    var el = document.getElementById('spanid');
    el.innerHTML ="<embed type='audio/mpeg' id='sarki' src="+arr[i]+ ">";

    it works. But I want the above code works.
    http://vebgelistirme.googlepages.com/sarki.htm
    Bismillahirrahmanirrahîm
    Bizi doğru yola, kendilerine nimet verdiklerinin yoluna ilet; gazaba uğrayanların ve sapıklarınkine değil.

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Perhaps it's because you have not got the type attribute in the first <embed>? In any case, shouldn't you be using <object>, since <embed> is deprecated?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •