code not working
4 posters
Page 1 of 1
code not working
supposedly this code is supposed to auto-refresh every 10 seconds. The first part shows what track is playing on my online radio show while the 2nd part shows whether the radio is online or not. Everything involved is on the homepage of my forum. The code works, but I tried modifying it so it would auto-refresh, but it didn't work. Can someone who's good with code help me out?
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
function refreshme(){
window.location='http://www.yourpage.com/index.html#bottom';
}
setTimeout("refreshme()",10000);
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
function refreshme(){
window.location='http://www.yourpage.com/index.html#bottom';
}
setTimeout("refreshme()",10000);
</script>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
function refreshme(){
window.location='http://www.yourpage.com/index.html#bottom';
}
setTimeout("refreshme()",10000);
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
function refreshme(){
window.location='http://www.yourpage.com/index.html#bottom';
}
setTimeout("refreshme()",10000);
</script>
10564- Forumember
- Posts : 48
Reputation : 0
Language : english
Re: code not working
Hello,
I tried the script on a test page and it works fine for me. It should work for you too.
Where exactly you are putting the code? and what happens?
I tried the script on a test page and it works fine for me. It should work for you too.
Where exactly you are putting the code? and what happens?
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: code not working
I'm putting it in the homepage message content section. I have other code there that works fine. This code works but does not refresh every 10 seconds like I would like it to.
10564- Forumember
- Posts : 48
Reputation : 0
Language : english
Re: code not working
I'll make it easy for u, replace the current refresh code with this:
- Code:
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
Re: code not working
when I put that in my forum freaked out and now nothing other than the chatbox is showing up D:
current code:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
</div>
current code:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
</div>
10564- Forumember
- Posts : 48
Reputation : 0
Language : english
Re: code not working
Ok, I see the refresh code was not properly added.
You can use this code...
EDIT :
The <meta> tag must go inside the <head> tags otherwise it will not work properly.
You can use this code...
- Code:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
<script type=text/javascript>
setTimeout(' document.location=document.location' ,10000);
</script>
EDIT :
The <meta> tag must go inside the <head> tags otherwise it will not work properly.
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: code not working
The code I just gave u just put it in there once and put it at the top of all the other code.
The other thing is it will refresh the whole page, are u only wanting the media player to refresh?
The other thing is it will refresh the whole page, are u only wanting the media player to refresh?
Re: code not working
Ankillien, I'm not sure what you're wanting me to do D:
And Jake, I only want this code to refresh:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
my current code is this:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
</script>
</div>
And Jake, I only want this code to refresh:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
my current code is this:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
<META
http-equiv="refresh"
content="10"; URL="http://harshnoise.forumotion.com/index.htm/">
</script>
</div>
10564- Forumember
- Posts : 48
Reputation : 0
Language : english
Re: code not working
I am just asking you to try use my code instead of the one you are using currently.
It will refresh the page every 10 seconds, isn't that what you want?
It will refresh the page every 10 seconds, isn't that what you want?
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: code not working
Ankillien, that code refreshes the entire page, I just want wanted this code to refresh every 10 seconds:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
10564- Forumember
- Posts : 48
Reputation : 0
Language : english
Re: code not working
Dude can u post all of ur homepage message code, idk if I will get to it straight away but I have an idea of how to get it to work or maybe ankillien can get to it right away
Re: code not working
alright, here it is:
<div align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width=728 height=486 id=chat align=middle>
<param name="allowScriptAccess" value="sameDomain" />
<param name=movie value=http://www.xatech.com/web_gear/chat/chat.swf /><param name=quality value=high /><param name=bgcolor value=#000000 />
<param name=FlashVars value="id=83986081&pass=28696362" />
<embed src=http://www.xatech.com/web_gear/chat/chat.swf quality=high bgcolor=#ffffff width=728 height=486 name=chat FlashVars="id=83986081&pass=28696362" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.xat.com/update_flash.shtml" /></object>
</p><div align="center" style="border: 0; padding-top: 20px;"><div id="player" style="width: 240px; height: 60px; border: 0;">
<br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
<script type=text/javascript>
setTimeout(' document.location=document.location' ,10000);
</script>
<br><br>
<a href="http://s4.myradiostream.com/19112.htm">Listen here</a>
<br><br>
<!-- You may edit the code below, this is just an example of how to link to your stream. -->
<p><div align="center" style="border: 0; padding-top: 20px;"><div id="player" style="width: 240px; height: 60px; border: 0;">
<div id="playerswf" style="display:inline-block; padding: 0; width: 240px; height: 60px; background-image:url('http://bellonline.co.uk/player/player.png'); border: 0;">
<object width="240" height="60">
<param name="movie" value="http://bellonline.co.uk/player/player.swf?url=http%3A%2F%2Fs4.myradiostream.com%3A19112/;&autoplay=1&title=HARSH NOISE " />
<param name="wmode" value="transparent" />
<embed src="http://bellonline.co.uk/player/player.swf?url=http%3A%2F%2Fs4.myradiostream.com%3A19112/;&autoplay=1&title=HARSH NOISE " width="240" height="60" wmode="transparent" type="application/x-shockwave-flash" />
</object>
</div>
</div>
</div>
</div>
</div>
<div align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width=728 height=486 id=chat align=middle>
<param name="allowScriptAccess" value="sameDomain" />
<param name=movie value=http://www.xatech.com/web_gear/chat/chat.swf /><param name=quality value=high /><param name=bgcolor value=#000000 />
<param name=FlashVars value="id=83986081&pass=28696362" />
<embed src=http://www.xatech.com/web_gear/chat/chat.swf quality=high bgcolor=#ffffff width=728 height=486 name=chat FlashVars="id=83986081&pass=28696362" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.xat.com/update_flash.shtml" /></object>
</p><div align="center" style="border: 0; padding-top: 20px;"><div id="player" style="width: 240px; height: 60px; border: 0;">
<br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script>
<br><br>
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
<script type=text/javascript>
setTimeout(' document.location=document.location' ,10000);
</script>
<br><br>
<a href="http://s4.myradiostream.com/19112.htm">Listen here</a>
<br><br>
<!-- You may edit the code below, this is just an example of how to link to your stream. -->
<p><div align="center" style="border: 0; padding-top: 20px;"><div id="player" style="width: 240px; height: 60px; border: 0;">
<div id="playerswf" style="display:inline-block; padding: 0; width: 240px; height: 60px; background-image:url('http://bellonline.co.uk/player/player.png'); border: 0;">
<object width="240" height="60">
<param name="movie" value="http://bellonline.co.uk/player/player.swf?url=http%3A%2F%2Fs4.myradiostream.com%3A19112/;&autoplay=1&title=HARSH NOISE " />
<param name="wmode" value="transparent" />
<embed src="http://bellonline.co.uk/player/player.swf?url=http%3A%2F%2Fs4.myradiostream.com%3A19112/;&autoplay=1&title=HARSH NOISE " width="240" height="60" wmode="transparent" type="application/x-shockwave-flash" />
</object>
</div>
</div>
</div>
</div>
</div>
10564- Forumember
- Posts : 48
Reputation : 0
Language : english
Re: code not working
To refresh only the code is not possible since it requires some AJAX scripting. It usually requires access to some PHP files or the database so we can't do it.
All we can do is auto-refresh the page using JavaScript.
All we can do is auto-refresh the page using JavaScript.
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: code not working
Hey guys... WaZaAp?!
10564, an Iframe will do the trick... *demo
(notice the content refreshing under your chatbox)
Create an Html page with your auto-refresh script...
(use forum header and footer? "no")
Copy the page Url from "Html pages management", add it to an
Iframe & position it after the chatbox (on your chat-music page)
Here is the entire code I used for the demo...
(you'll need to customize the page/add a background etc)
10564, an Iframe will do the trick... *demo
(notice the content refreshing under your chatbox)
Create an Html page with your auto-refresh script...
(use forum header and footer? "no")
- Code:
<center><script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script> <script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
<script type=text/javascript>
setTimeout(' document.location=document.location' ,10000);
</script></center>
Copy the page Url from "Html pages management", add it to an
Iframe & position it after the chatbox (on your chat-music page)
- Code:
<iframe src=http://Your New Script Page.htm marginheight=0 marginwidth=0 frameborder=0 height=100% width=100% scrolling=no></iframe>
Here is the entire code I used for the demo...
(you'll need to customize the page/add a background etc)
- Code:
<body bgcolor="lightblue"><div align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width=728 height=486 id=chat align=middle>
<param name="allowScriptAccess" value="sameDomain" />
<param name=movie value=http://www.xatech.com/web_gear/chat/chat.swf /><param name=quality value=high /><param name=bgcolor value=#000000 />
<param name=FlashVars value="id=83986081&pass=28696362" />
<embed src=http://www.xatech.com/web_gear/chat/chat.swf quality=high bgcolor=#ffffff width=728 height=486 name=chat FlashVars="id=83986081&pass=28696362" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.xat.com/update_flash.shtml" /></object>
</p><div align="center" style="border: 0; padding-top: 20px;"><div id="player" style="width: 240px; height: 60px; border: 0;">
<br>
<iframe src=http://zone3.forumotion.com/Test-Refresh-h101.htm marginheight=0 marginwidth=0 frameborder=0 height=100% width=100% scrolling=no></iframe>
<a href="http://s4.myradiostream.com/19112.htm">Listen here</a>
<br><br>
<!-- You may edit the code below, this is just an example of how to link to your stream. -->
<p><div align="center" style="border: 0; padding-top: 20px;"><div id="player" style="width: 240px; height: 60px; border: 0;"><div id="playerswf" style="display:inline-block; padding: 0; width: 240px; height: 60px; background-image:url('http://bellonline.co.uk/player/player.png'); border: 0;">
<object width="240" height="60">
<param name="movie" value="http://bellonline.co.uk/player/player.swf?url=http%3A%2F%2Fs4.myradiostream.com%3A19112/;&autoplay=1&title=HARSH NOISE " />
<param name="wmode" value="transparent" />
<embed src="http://bellonline.co.uk/player/player.swf?url=http%3A%2F%2Fs4.myradiostream.com%3A19112/;&autoplay=1&title=HARSH NOISE " width="240" height="60" wmode="transparent" type="application/x-shockwave-flash" />
</object>
</div>
</div>
Re: code not working
RoNo, that works excellently
THANK YOU SOOOOOOOOOO MUCH
THANK YOU SOOOOOOOOOO MUCH
10564- Forumember
- Posts : 48
Reputation : 0
Language : english
Re: code not working
You can give it bold color like this
- Code:
<center><b><font color="orange"><script type="text/javascript" src="http://shoutcast.mixstream.net/js/song/uk4-free:19112">
You appear to have javascript turned off.
</script> <script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk4-free:19112">
You appear to have javascript turned off.
</script>
<script type=text/javascript>
setTimeout(' document.location=document.location' ,10000);
</script></font></b></center>
This topic is solved. Glad I could help. LockedRoNo |
Similar topics
» Code Box Not Working!
» code not working
» Code isn't working?
» Code isn't working
» Code not working
» code not working
» Code isn't working?
» Code isn't working
» Code not working
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum