Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Add javascript file to forum
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Niox
Starting Member

31 Posts

Posted - 01 October 2003 :  06:11:29  Show Profile
I have a website with frames and for my menu to work a have to add this (http://ww.vermonden.nl/menu1.txt) to the forum.
Only i have no idea to witch file(s) i should add it and how i should add it. In a normal html page to link to the file looks like this: <script src="menu1.js" type="text/javascript"></script>

For the website look at http://www.vermonden.nl. Click on forum to go the forum.

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 01 October 2003 :  06:49:39  Show Profile
most likely you should add the code to inc_header.asp around the other JavaScript codes
Go to Top of Page

Niox
Starting Member

31 Posts

Posted - 01 October 2003 :  10:39:36  Show Profile
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine
%>
<script src="menu1.js" type="text/javascript"></script>
<%
call sForumNavigation()
Response.Write "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine

I tried it like this but it doesn't work. Is it in the wrong place or should this <script src="menu1.js" type="text/javascript"></script> be different ?
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 01 October 2003 :  11:26:39  Show Profile  Visit Gremlin's Homepage
I would say its most likely in the wrong place, generally you would have the javascript includes right up in the <head> section of the HTML. Look in inc_header.asp and find out where the HTML <head> tag is written and try insterting your code around there. Word of advance warning theres actually TWO places in inc_header.asp that writes out the <HEAD> tag.


Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 October 2003 :  11:34:36  Show Profile
Is menu1.js in the same directory as your forum files? If not then you will have to point the src attribute to the correct directory (e.g., ../menu1.js if the file is one directory above your forum files).


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Niox
Starting Member

31 Posts

Posted - 01 October 2003 :  15:15:38  Show Profile
The file has to be between the <body> tags.
MeTV: I already changed that but thanx anyway
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 01 October 2003 :  16:41:24  Show Profile
Find line 280 and 281 in inc_header.asp which should look like this:
		"<a name=""top""></a><font face=""" & strDefaultFontFace & """>" & vbNewLine & _
		vbNewLine & _


Add the code in red so it'll look like this:
		"<a name=""top""></a><font face=""" & strDefaultFontFace & """>" & vbNewLine & _
		<script src=""menu1.js"" type=""text/javascript""></script>vbNewLine & _


Mind the double set of quotes! This should do the trick.
Go to Top of Page

Niox
Starting Member

31 Posts

Posted - 02 October 2003 :  04:44:07  Show Profile
Tnx a lot! But I get a syntax error when i try this:

Microsoft VBScript compilation error '800a03ea'

Syntax error

inc_header.asp, line 281

<script src=""menu1.js"" type=""text/javascript""></script>vbNewLine & _
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 02 October 2003 :  05:08:41  Show Profile
oh poop.. I forgot to add the quotes. Add a quote before <script and a quote and ampersand after </script> so it'll look like this:
"<script src=""menu1.js"" type=""text/javascript""></script>" & vbNewLine & _

sorry about that
Go to Top of Page

Niox
Starting Member

31 Posts

Posted - 02 October 2003 :  05:33:08  Show Profile
That's works! Thanx a lot!
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 02 October 2003 :  06:44:24  Show Profile
you're welcome
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07