thesoundsmith
Active Coder
I have a "radio" on my WordPress site to play mp3s. You can see it in action here: The DashRadio page
When you select a different radoi "channel," like Blues or Jazz, the text changes. The words are correct but the sytle does not carry through. I want the phrase "DashRadio" to be styled as follows:
It is sometimes invoked in this call:
This will pass the Bold and Italics, but not the Span or the font treatment. And w3c does not like the '/' in the text. How can I get the styled text through?
Forgot to add- it's used here:
Thanks
When you select a different radoi "channel," like Blues or Jazz, the text changes. The words are correct but the sytle does not carry through. I want the phrase "DashRadio" to be styled as follows:
CSS:
*.prad{font-style:italic;font-weight:bold; font-family: Georgia,'Times New Roman',
Times,serif;color:#6A3ED0}
Code:
<script>
function nuStyle(myStyle) {
var theStyle = myStyle;
var curStyle = document.getElementById("radio");
var nuScript = curStyle.getElementsByTagName("script");
switch (theStyle) {
case 'easy':
{
document.getElementById("mStyl").innerHTML = "<b><i>DashRadio</i>: Over Easy</b><br><br>All the mellow, relaxing music from The Soundsmith in one place!";
document.getElementById("hdln").innerHTML = "<b><i>DashRadio</i>: Over Easy</b>";
jwplayer('radio').load("https://www.davidkempton.com/xml/radeasy.xml");
}
break;
case 'jazz':
{
document.getElementById("mStyl").innerHTML = "<b><i>DashRadio</i>: The Jazz Joint</b><br><br>All of the best jazz from The Soundsmith in one place!";
document.getElementById("hdln").innerHTML = "<b><i>DashRadio</i>: The Jazz Joint</b>";
jwplayer('radio').load("https://www.davidkempton.com/xml/radjz.xml");
};
break;
default:
{
document.getElementById("mStyl").innerHTML = "<b><i>DashRadio</i>: Hear It All!</b><br><br>All the great music from The Soundsmith in one place!";
document.getElementById("hdln").innerHTML = "<b><i>DashRadio</i>: Hear It All!</b>";
jwplayer('radio').load("https://www.davidkempton.com/xml/radioall.xml");
}
break;
};
};
</script>
Forgot to add- it's used here:
HTML:
<body onload="createPlayer()">
<!-- wrap starts here -->
<div id="wrap">
<!--header -->
<div id="header" title="">
</div>
<!-- content-wrap starts -->
<div id="content-wrap">
<div id="main">
<h2 id="hdln"><span class="prad">DashRadio</span>: <b>Hear It All!</b></h2>
<div id="mymov">
</div></div></div></div>
</body>
Last edited: