Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the title of the song and its author to scroll them on the title bar in this Web radio

Status
Not open for further replies.

crackoo

Programmer
Feb 17, 2011
132
TN
Hi
For the purpose of changing a personal Web Radio found here I want to scroll the title of the music and its author in the title bar. but I do not know how to get and store them in a variable for scrolling instead of what I managed to do so far in this HTA
JavaScript:
<HTA:APPLICATION 
APPLICATIONNAME = "Radio Player"
SINGLEINSTANCE = "yes"
ICON = "radio.ico" 
SCROLL = "no"
MAXIMIZEBUTTON = "no"
SELECTION = "no"
CONTEXTMENU = "no"
BORDER = "thin"
INNERBORDER = "no"
SYSMENU="no"
></HTA:APPLICATION>
<head>
<script>window.resizeTo(200, 140);</script>
<script>window.moveTo(820,0);</script>
<script src="[URL unfurl="true"]http://www.radionomy.com/Scripts/PlayerExtBig.js"[/URL] type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    initMooTools();
    initJQuery();
    var _radUID = 'd971de27-b77e-4dd2-b2fa-bfc0a1bea331';
    var _isMute = False;
</script>
<script src="[URL unfurl="true"]http://www.radionomy.com/Scripts/PlayerExtCommon.js"[/URL] type="text/javascript"></script>
<script language="JavaScript">
 var txt=" Hackoo Web Radio For You (^_^) ";
 var vitesse=1000;
 var refresh=null;
 function scroll_title() {
 document.title=txt;
 txt=txt.substring(1,txt.length)+txt.charAt(0)
 refresh=setTimeout("scroll_title()",vitesse);}
 scroll_title();
 </script>
 </head>
<title></title>
<body Title="Double-clic ici pour fermer cette Application !" ondblclick="Fermer()" style="margin:0;padding:0;">
<SCRIPT LANGUAGE="VBScript">
Sub Fermer()
Question = MsgBox("Voulez-vous Fermer cette Application ?",VBYesNO+VbQuestion,"Fermeture de l'application")
If Question = VbYes Then
Window.close
Else
    Exit Sub
End If
End Sub
</script>
<div id="HeaderPlayer">
    <div id="PlayerMain">
        <div id="Logo">
            <a href="#" id="player-logo-link" target="Content">
                <img id="player-logo-img" alt="Logo" title="Logo" />
            </a>
        </div>
        <div id="RadioName"></div>
        <div id="Title"></div>
        <div id="Artist"></div>
        <div id="PlayPause">
            <img id="btnPlayPause" alt="Play/Pause" />
        </div>
        <div id="Volume">
            <div id="Volume1"></div>
            <div id="Volume2"></div>
            <div id="Volume3"></div>
            <div id="Volume4"></div>
            <div id="Volume5"></div>
        </div>
        <div id="ExtPlayers">
            <a href="[URL unfurl="true"]http://listen.radionomy.com/dance-plus-radio.m3u"[/URL] target="_blank">
                <img src="[URL unfurl="true"]http://www.radionomy.com/Images/winamp16.png"[/URL] alt="Winamp" title="Winamp" />
            </a>
            <a href="[URL unfurl="true"]http://listen.radionomy.com/dance-plus-radio.m3u"[/URL] target="_blank">
                <img src="[URL unfurl="true"]http://www.radionomy.com/Images/wmp16.png"[/URL] alt="Windows Media Player" title="Windows Media Player" />
            </a>
            <a href="[URL unfurl="true"]http://listen.radionomy.com/dance-plus-radio.m3u"[/URL] target="_blank">
                <img src="[URL unfurl="true"]http://www.radionomy.com/Images/itunes16.png"[/URL] alt="iTunes" title="iTunes" />
            </a>
        </div>
        <div id="RadionomyLogo">
            <a href="[URL unfurl="true"]http://www.radionomy.com"[/URL] target="_blank">
                <img id="RadioLogo" src="[URL unfurl="true"]http://www.radionomy.com/Images/radionomyV.gif"[/URL] alt="Radionomy" title="Radionomy" />
            </a>
        </div>
        <div id="Cover">
            <img id="CoverPicture" onclick="JumpCover()" alt="Cover" title="Cover" style="cursor: hand" />
        </div>
    </div>
    <div id="PlayerEmbed"></div>
</div>
</body>
Thank you for your Help !
 
Ok, one thing I noticed...your VBScript would function just as well as a JavaScript confirm() popup; last I checked, window.close() works in JS too, so no need to mix scripting languages there ;)

Aside from that, I wasn't able to catch where you're obtaining/printing the title/artist/etc for display from the excerpt you posted; if you could trim it down and show us just the relevant parts of what HAS worked for you so far (I saw that you got them to display in the little player frame in the "fiddle" but I don't have the time or inclination to dig through multiple .js files to find how); then it'll be easier for myself, or someone else here, to help you accomplish what you WANT to work for you.

I hope this helps;
robherc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top