Hi

I was designing a website on blogger.com in which i added a JavaScript code for Live streaming into Media Player as give below...

<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="mediaplayer1" showstatusbar="true" enablecontextmenu="false" autostart="false" width="320" height="60" loop="false" src="[B][I]mms://216.185.43.237/radiocity 1[/I][/B]" /></embed>

Now i want to change the link location as for this SRC part i want that if i click on a HTML tab say "Song2" then the location for this SRC should be changed to other location say "http://hangama.com/songs.aspx" and then in this Media player the live streaming should be started from the other link.

All though i would like to tell you that this HTML/JavaScript code is used through a inbuilt Gadget...

Please suggest me any code/function to change the location of Player with clicking on HTML tabs...


Thanks

Member Avatar for stbuchok

Give the embed tag an ID, let's say EmbedID, then do the following:

document.getElementById('EmbedID').setAttribute('src','http://hangama.com/songs.aspx');

//using jQuery it should be something like this.

$('#EmbedID').attr('src', 'http://hangama.com/songs.aspx');

Disclaimer: I have not tested this in any way shape or form.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.