turkiyem.fm
12-20-2008, 03:20 PM
hi all, i am hoping if someone could help me out with my problem here
help would be really appreciated.
I got a script written by someone for me and can't reach to him anymore and I need this to be fixed.
the problem is that the script works when the page is loaded so when i try to visit a link the url will automaticly go into the player.
If possible i would like to activate the javascript onMouseOver="init()" and deactivate it onMouseOut="clear()"
example <a href="#" onMouseOver="init()" onMouseOut="clear()"></a> or in a <div>
JavaScript
=========================
radio.js
=========================
window.onload = init();
function init () {
var x = document.getElementsByTagName ('a');
for (i = 0; i < x.length; i++) {
x[i].onclick = function () {
document.getElementById('below').innerHTML = "<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+ this.href +"' name='MediaPlayer1' width='217' height='84' controltype='1' showcontrols='1' showstatusbar='0' AutoStart='true'></embed> ";
return false;
}
}
}
HTML
======================
index.html
======================
<a href="mms://strm-4.us.media.tv/KRALFM_64?MSWMExt=.asf" onMouseOver="init()" onMouseOut="clear()"></a>
<embed
type="application/x-mplayer2"
id="MediaPlayer1"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
src=""
name="MediaPlayer1"
controltype="1"
showcontrols='1'
showstatusbar="0"
autostart="1"
height="84"
width="217" /> </embed>
help would be really appreciated.
I got a script written by someone for me and can't reach to him anymore and I need this to be fixed.
the problem is that the script works when the page is loaded so when i try to visit a link the url will automaticly go into the player.
If possible i would like to activate the javascript onMouseOver="init()" and deactivate it onMouseOut="clear()"
example <a href="#" onMouseOver="init()" onMouseOut="clear()"></a> or in a <div>
JavaScript
=========================
radio.js
=========================
window.onload = init();
function init () {
var x = document.getElementsByTagName ('a');
for (i = 0; i < x.length; i++) {
x[i].onclick = function () {
document.getElementById('below').innerHTML = "<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+ this.href +"' name='MediaPlayer1' width='217' height='84' controltype='1' showcontrols='1' showstatusbar='0' AutoStart='true'></embed> ";
return false;
}
}
}
HTML
======================
index.html
======================
<a href="mms://strm-4.us.media.tv/KRALFM_64?MSWMExt=.asf" onMouseOver="init()" onMouseOut="clear()"></a>
<embed
type="application/x-mplayer2"
id="MediaPlayer1"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
src=""
name="MediaPlayer1"
controltype="1"
showcontrols='1'
showstatusbar="0"
autostart="1"
height="84"
width="217" /> </embed>