Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 07-14-2004, 11:49 AM Script Calling
DaveTodd's Avatar
Evil Psycho Alien

Posts: 684
Location: Sheffield, England
Trades: 0
I have multiple javascripts powering a DHTML menu at the top of my page.

I would like to replace all these script calls with just one line of code that calls the other lines from an external file.

Is this possible?

It would be a script to call many scripts which call many files.

Just because it's something calling something else, I was wondering if it was possible to do? Would save about 10 lines in the HTML, and thus improve rankings for the pages.
__________________
take care,
Dave ;)

Please login or register to view this content. Registration is FREE
DaveTodd is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-14-2004, 10:10 PM
johanesw's Avatar
Extreme Talker

Posts: 174
Location: If I told you that, I'm afraid I'd have to kill you!
Trades: 0
first put your scripts into a file and save it as a .js

Then, in the page where you want to call that file, add this line
HTML Code:
<script language="JavaScript" src="yourpath/name_of_yourscript.js">
</script>
That's it
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
johanesw is offline
Reply With Quote
View Public Profile Visit johanesw's homepage!
 
Old 07-19-2004, 07:11 AM
DaveTodd's Avatar
Evil Psycho Alien

Posts: 684
Location: Sheffield, England
Trades: 0
tried it, but it doesn't work for some reason...

can a script be called that calls other scripts? will the second lot of scripts call?
__________________
take care,
Dave ;)

Please login or register to view this content. Registration is FREE
DaveTodd is offline
Reply With Quote
View Public Profile
 
Old 07-19-2004, 11:38 AM
praveen's Avatar
Life is a Dream

Posts: 3,591
Name: Praveen
Location: Chennai, India
Trades: 0
Dave,

back sometime ago, i tried that.. it works sometimes and doesnt..

basically, to answer ur q, yes you can call other js from one..

whether it will work 100% is something icant promise
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
praveen is offline
Reply With Quote
View Public Profile
 
Old 07-21-2004, 09:04 AM
DaveTodd's Avatar
Evil Psycho Alien

Posts: 684
Location: Sheffield, England
Trades: 0
thankx Prav. i figure if it could be done with 100% effectiveness, the company who designed our menu script would have done it...or at least i hope they would have.

don't think i'll risk it if its not 100% certain, there's bound to be a millionaire out there who'se gonna by thousands of pounds worth of equipment...still using NS3 *shudder*
__________________
take care,
Dave ;)

Please login or register to view this content. Registration is FREE
DaveTodd is offline
Reply With Quote
View Public Profile
 
Old 07-21-2004, 12:44 PM hi
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
Did you say your still using NS3? That would be humiliating lol...


Mik
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 07-24-2004, 10:47 AM
DaveTodd's Avatar
Evil Psycho Alien

Posts: 684
Location: Sheffield, England
Trades: 0
not me...course not

but there's bound to be someone out there who would potentially spend lots of money, who'se using NS3 and thus wouldn't be able to use our non-100% compatible menu

so we're sticking to the current version
__________________
take care,
Dave ;)

Please login or register to view this content. Registration is FREE
DaveTodd is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Script Calling
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.79356 seconds with 12 queries