SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    doRighteousDeeds++
    Join Date
    Aug 2006
    Location
    تركيا Turkey Türkiye
    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
    The Time Through Ages. In the Name of Allah, Most Gracious, Most Merciful.
    1. By the Time, 2. Verily Man is in loss,
    3. Except such as have Faith, and do righteous deeds, and (join together) in the mutual enjoining of Truth, and of Patience and Constancy.

  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
  •