HTML Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsOtherHTML Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
  #1  
Old June 12th, 2003, 06:30 AM
garybag1's Avatar
garybag1 garybag1 is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Sheffield
Posts: 100 garybag1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
javascript to a seperate folder?

Hiya all, Sorry about this, I feel a bit thick asking this but I really need to know.
I know that javascript in the head of the document should be kept in a seperate file so that the robots don't have to trawl through it, but what is the best way to do this?
Is it simply a case of highlighting it all then cut and paste it into a folder marked .js?
Im sure it cant be that simple but then Im also sure it can't be that hard.
Anyone shed any light on the subject? Please.

Reply With Quote
  #2  
Old June 12th, 2003, 08:11 AM
fraggle fraggle is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 128 fraggle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 20 sec
Reputation Power: 6
Send a message via ICQ to fraggle
you have the javascript as follows:

<SCRIPT LANGUAGE="JavaScript">

<!--
xyz
// -->

</SCRIPT>

then to call it up, you would need to copy:

<!--
xyz
// -->

into a text file and save it as java.js (or whatever)

then open up the java.js file and delete the commment
tags (<!-- // -->) as these will just **** things up.

now go back to your original page and you should have:

<SCRIPT LANGUAGE="JavaScript">
</SCRIPT>

change it to the following to call up the javascript:

<SCRIPT LANGUAGE="JavaScript" src="java.js"></SCRIPT>

(ie. just add src="" to it, just like an image calls
up it's source <img src="x.jpg">)

hope that helps

Reply With Quote
  #3  
Old June 12th, 2003, 08:24 AM
garybag1's Avatar
garybag1 garybag1 is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Sheffield
Posts: 100 garybag1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Cheers fraggle. Thats great, I new it wouldn't be too difficult but I wasn't sure how to make things call up the javascript.
Thanks again.

Reply With Quote
  #4  
Old June 12th, 2003, 10:45 AM
fraggle fraggle is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 128 fraggle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 20 sec
Reputation Power: 6
Send a message via ICQ to fraggle
oops ... i copied that from an email i sent to a friend a couple of days ago and looks like i left a dodgy word in there

No porblem anyway

Reply With Quote
  #5  
Old June 12th, 2003, 01:04 PM
garybag1's Avatar
garybag1 garybag1 is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Sheffield
Posts: 100 garybag1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Thats fine, Might as well say it as think it I say.

Tried it out and all works perfectly. Cheers for the tip.

Reply With Quote
Reply

Viewing: SEO Chat ForumsOtherHTML Coding > javascript to a seperate folder?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT