Lost Password?

  #1 (permalink)  
Old 12-05-2006, 02:34 PM
TcM's Avatar   
TcM TcM is offline
Code Slinger.. FTW!
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 6,443
Rep Power: 60
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default JavaScript:Tutorial, Using an External Script

Introduction:-
Here in this tutorial I will tell you how to use an External JavaScript file, so if you have a chunk of code that will be used in multiple pages, you will have to make one Script and then call it from the pages instead of making the same code over and over again!

Solution:-
Open a Text Editor and paste the following code and save it as <<Name>>.js I named it 'External Script.js', this is just a script that will show the time but here you can insert whatever you want!!

Code:
test = new Date()
month = test.getMonth()
month = (month * 1) + 1
day = test.getDate()
year = test.getFullYear()
document.write(" ",month,"/",day,"/",year," ")
And this code in the main HTML file:-

Code:
<SCRIPT SRC="External Script.js">
</SCRIPT>
Explanation:-
Code:
<SCRIPT SRC="External Script.js">
</SCRIPT>
Here we are just calling the External Script, instead of "External Script.js" make whatever name you named your script!

A Preview:-
None

Conclusion:-
As Always Feedback is welcome and the full source is attached!!
Attached Files To view attachments your post count must be 1 or greater. Your post count is 0 momentarily.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 12-30-2006, 03:12 AM
xtraze xtraze is offline
Programming God
 
Join Date: Dec 2006
Location: Sri lanka
Posts: 921
Rep Power: 0
xtraze is on a distinguished road
Send a message via MSN to xtraze Send a message via Skype™ to xtraze
Default

I use it already and it help us to keep the code beautiful, perhaps.
And easy to integrate js into sites.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-30-2006, 05:57 AM
TcM's Avatar   
TcM TcM is offline
Code Slinger.. FTW!
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 6,443
Rep Power: 60
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default

Quote:
Originally Posted by xtraze View Post
I use it already and it help us to keep the code beautiful, perhaps.
And easy to integrate js into sites.
Yup I agree! I will keep your source code nice, but that would make it more easy for other users to understand it and copy it! I don't care how nice the source is, the worst the better for my site, so people wont understand it easily, the important is that I understand it!
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-03-2007, 09:59 AM
xtraze xtraze is offline
Programming God
 
Join Date: Dec 2006
Location: Sri lanka
Posts: 921
Rep Power: 0
xtraze is on a distinguished road
Send a message via MSN to xtraze Send a message via Skype™ to xtraze
Default

To protect things right-click menu can be disabled and I have seen matters when I see the source of some certain websites, Firefox closes. Exit. in about 5 seconds or less.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-03-2007, 10:17 AM
TcM's Avatar   
TcM TcM is offline
Code Slinger.. FTW!
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 6,443
Rep Power: 60
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default

Well the Right-Click menu thing is just stupid I know 1000 ways on how to get round thats! thats just a waste of time!

about the second.. hmm I never saw that , but lol I still can hack it its simple! Show me such website and I will show you its source... It's simple to bypass such thing!
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 09-07-2007, 10:03 AM
WillB's Avatar   
WillB WillB is offline
Learning Programmer
 
Join Date: Apr 2007
Location: St. Cloud, Fl
Age: 19
Posts: 43
Rep Power: 5
WillB is on a distinguished road
Default

Quote:
Originally Posted by Tcm9669 View Post
Well the Right-Click menu thing is just stupid I know 1000 ways on how to get round thats! thats just a waste of time!

about the second.. hmm I never saw that , but lol I still can hack it its simple! Show me such website and I will show you its source... It's simple to bypass such thing!
What about a website that was written in Coldfusion? Or perhaps Flex?
__________________
Everything in Life can be solved with an 'If/Else' statement.

Life is like one big try/catch statement, nested within a loop.

-Will

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-08-2007, 05:55 AM
TcM's Avatar   
TcM TcM is offline
Code Slinger.. FTW!
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 6,443
Rep Power: 60
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default

Well that is encrypted not just hidden but nothing is 100% safe!
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 09-11-2007, 07:39 AM
WillB's Avatar   
WillB WillB is offline
Learning Programmer
 
Join Date: Apr 2007
Location: St. Cloud, Fl
Age: 19
Posts: 43
Rep Power: 5
WillB is on a distinguished road
Default

Quote:
Originally Posted by TheComputerMaster View Post
Well that is encrypted not just hidden but nothing is 100% safe!
Indeed!
__________________
Everything in Life can be solved with an 'If/Else' statement.

Life is like one big try/catch statement, nested within a loop.

-Will

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
(Script) Copy content to clipboard, how? annannienann Visual Basic Programming 0 06-19-2007 05:20 PM
Need help with proxy script please TcM PHP Forum 4 05-16-2007 09:54 AM
Need Help With a Script tfusion PHP Forum 5 04-14-2007 07:35 PM
calling C script from via Matlab rattlepanos C and C++ 3 02-16-2007 11:06 AM


All times are GMT -5. The time now is 08:08 PM.

Contest Stats

Xav ........ 164.00000
dargueta ........ 128.00000
John ........ 127.00000
gaylo565 ........ 18.00000
XaNaX ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

Ads