TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 582
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 144
  • Total: 144

Cant Add Certain Code Into Block?

Started by alan s, May 09, 2006, 05:02:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alan s

I tryed to add the "bookmark us " code into a html/javascript block , using this code
<center>
<Script>
function ssbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
<a href="javascript:ssbookmark('TheTeenZone.Net', 'http://www.theteenzone.net')"><b>Bookmark TheTeenZone</b></a>
<br><br>
<SCRIPT LANGUAGE="JavaScript">


</script></center>


But I Get The Error

Forbidden
You don't have permission to access /forums/index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


and yet its just that code , i've tryed other codes and they work perfectly  , any ideas anyone?

elpvn

Try CHMOD forum folder to 755 permission  ;D

alan s


G6Cad

Add this to the very top of the code

global $scripturl;

alan s

nope still the same after adding that code G6

G6Cad

If you have your portal in another folder than the root, try to add the path to that instead of to the root when thats where you get permission denied

Eg <a href="javascript:ssbookmark('TheTeenZone.Net', 'http://www.theteenzone.net/smf/')"><b>Bookmark TheTeenZone</b></a>

alan s

nope for some reason its this bit of the code that makes the error message appear

<Script>
function ssbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>

alan s

Could my host have something that stops javascript from being activated on the server?

G6Cad

I think you might have to ask your host that question

rbh

here is the book mark script i use with no problems. it is very close to what you have but some minor differences. you can try it and see.

<Script>
// Bookmark Script IE & Firefox
// No Need To Change Below
function tpbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
<center><a href="javascript:tpbookmark('SITE NAME HERE', 'SITE URL')">CLICK HERE TO BOOKMARK[/url]</center>


This website is proudly hosted on Crocweb Cloud Website Hosting.