having problems linking to ext. .js file

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   having problems linking to ext. .js file
Ryman
CZ Super Newbie
Ryman has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Occupation: Student, Webmaster, That little annoying geek
Fav. Sports Team: STL Cardinals
Website:
Status: Offline
Joined: Jan 13, 2004
0.01 posts per day
Posts: 50
Points: 3,510
   
i am having problems using the script tag to link to an external file. I would like to make a virus alert ticker for my site, that other ppl can use on their site. i have the script, but i cant call it using the script tag. a little help please??



Back to top Reply with quote
#2   
SpLiNteR
CZ Addict
SpLiNteR has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 34
Gender: Male
Fav. Sports Team: Leeds United
Website:
Status: Offline
Joined: Feb 08, 2004
0.05 posts per day
Posts: 397
Points: 206,328
AIM Address Yahoo Messenger MSN Messenger ICQ Number
you mean when you have something like:



<script language="JavaScript" src="slidemenu.js" type="text/javascript"> obviously changing slidemenu.js with the name of your javascript file.

What exactly is the problem, you cant see the script on ur site? Is the script uploaded to ur server (if ur using an online one) is it in the same folder?




_________________
Back to top Reply with quote
#3   re: having problems linking to ext. .js file
Ryman
CZ Super Newbie
Ryman has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Occupation: Student, Webmaster, That little annoying geek
Fav. Sports Team: STL Cardinals
Website:
Status: Offline
Joined: Jan 13, 2004
0.01 posts per day
Posts: 50
Points: 3,510
   
it keeps giving me a syntax error on the file that the script tag is in, so i cant see it



Back to top Reply with quote
#4   
SpLiNteR
CZ Addict
SpLiNteR has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 34
Gender: Male
Fav. Sports Team: Leeds United
Website:
Status: Offline
Joined: Feb 08, 2004
0.05 posts per day
Posts: 397
Points: 206,328
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Past the HTML Code you are trying to use please




_________________
Back to top Reply with quote
#5   re: having problems linking to ext. .js file
Ryman
CZ Super Newbie
Ryman has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Occupation: Student, Webmaster, That little annoying geek
Fav. Sports Team: STL Cardinals
Website:
Status: Offline
Joined: Jan 13, 2004
0.01 posts per day
Posts: 50
Points: 3,510
   
[script src="virusalert.js"][/script]

i had to use the brackets, the forums would not let me post with the greaterthan lessthan signs, normally i would use them


Back to top Reply with quote
#6   
SpLiNteR
CZ Addict
SpLiNteR has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 34
Gender: Male
Fav. Sports Team: Leeds United
Website:
Status: Offline
Joined: Feb 08, 2004
0.05 posts per day
Posts: 397
Points: 206,328
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Ok then, try this, if you downloaded the script, try just downloading it again and uploading it to your host. Did it supply instructions on which HTML code to use as you may have noticed the one i used is different to yours.

But a syn error..i thought they olny had them on calculators icon_biggrin.gif
Check to make sure the js file is without errors if you've made any changes to it.

If its being used on a HTML file try just opening it on your comp and see the results. This wont work with PHP, ASP and coldfusion as far as i know, as they need testing servers.




_________________
Back to top Reply with quote
#7   re: having problems linking to ext. .js file
Ryman
CZ Super Newbie
Ryman has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Occupation: Student, Webmaster, That little annoying geek
Fav. Sports Team: STL Cardinals
Website:
Status: Offline
Joined: Jan 13, 2004
0.01 posts per day
Posts: 50
Points: 3,510
   
it wont run on my comp, that is where i discovered the problem. the virusalert.js file was in the same directory as the html, btw. i try running the .js file alone, and it works fine.



Back to top Reply with quote
#8   
SpLiNteR
CZ Addict
SpLiNteR has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 34
Gender: Male
Fav. Sports Team: Leeds United
Website:
Status: Offline
Joined: Feb 08, 2004
0.05 posts per day
Posts: 397
Points: 206,328
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Well then, a quick search on google for "syntax errors on javascript" reveals a lot of answers.
[ Register or login to view links on this board. ]

This link reveals a few reasons for javascript errors, so check that out if you think it applies.

[script type="text/javascript" src="virusalert.js"][/script] try that, switching the little bracket type things with arrows/less than, greater than signs.

Ill kepp looking, post back if i find anything.




_________________
Back to top Reply with quote
#9   re: having problems linking to ext. .js file
Ryman
CZ Super Newbie
Ryman has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Occupation: Student, Webmaster, That little annoying geek
Fav. Sports Team: STL Cardinals
Website:
Status: Offline
Joined: Jan 13, 2004
0.01 posts per day
Posts: 50
Points: 3,510
   
still get a syn error



Back to top Reply with quote
#10   
SpLiNteR
CZ Addict
SpLiNteR has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 34
Gender: Male
Fav. Sports Team: Leeds United
Website:
Status: Offline
Joined: Feb 08, 2004
0.05 posts per day
Posts: 397
Points: 206,328
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Im beginning to think it's your script. Where di you dwonload it? Or if you made it, do you know of any errors you may of accidently made?

Oh, i forgot to ask a while ago, has it previously worked before and suddenly stoppped working? Or has it been like this since you previewed your site?




_________________
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum