Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Jan 11, 2010 11:11:56 GMT 12
Hello, I'm going to set this out easyly by starting with just the basic JavaScript.
Lesson One: The start of making a code.[/color][/size] So I'm going to show you how to start a script. It involves the following: <script language = "text/javascript">
To put that in english it would be like: Define the script language. Script language = " " Next what you put is: <!-- So now what it looks like is the following: <script language = "text/javascript"> <!--
This is the start of the script, the end looks like this: // --> </script>
Over all we have something looking like the following: <script language = "text/javascript"> <!--
Code in here
// --> </script>
Next part of the lesson which will be posted in a reply to this thread will teach you the next step of JavaScript
|
|
Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Jan 11, 2010 11:12:39 GMT 12
Lesson two: Putting some text into the codeSo now what I'm going to teach you is how to write text. In Javascript you don't just write the text theres ways to do it. So as you know the main bits you need to do to make it work, put the following where I put Put code here document.write("hello"); So hopefully what you see is= <script language = "text/javascript"> <!-- document.write("hello"); // --> </script>
Then what that will write is Hello. Yes that was a very short lesson but it's very easy, next will will be getting the variables and putting comments in. PM me or reply below if you have questions.
|
|
|
Post by justin on Jan 17, 2010 8:33:46 GMT 12
<script language = "text/javascript" >forgot the red part in the above post nice tutorial for those wanting to begin coding
|
|
Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Jan 19, 2010 9:51:58 GMT 12
Thanks, I'll post the next bit soon
|
|
Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Jan 22, 2010 10:16:25 GMT 12
Lesson Three: Comments and variablesSo now what we are going to move onto is comments and variables. Comments come very handy when you want to tell the user of your code what to do. For example: <script type= "text/javascript"> // This is a single line comment. Good to use to tell the user what a line means /*This is a mutiple lined Comment */ </script>
So basicly the comment is easy to remember and doesn't show up in the code you just see it as you install it.
Now we have variables.
This is a basic Variable:
<script type="text/Javascript"> var myVariable = "The Variable Text Here"; document.write(myVariable) </script>
What that would do is write:
'The Varible Text Here'
It can be used in many other ways but that is the basic way of doing a varible. If you want to learn more about Variables which if I were you I would look out for my new lesson which will come out after this which will be a little more advanced. Next what we are going to learn is a basic location check. What that is is a easy way to write certain text on one certain board. We will cover that though in the next lesson. So practice Varibles and comments
|
|
Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Feb 7, 2010 15:28:38 GMT 12
Next lesson soon!!
|
|
Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Mar 8, 2010 16:09:42 GMT 12
Lesson Four: If LocationSo this will be a quick lesson as I have to go soon and if locations are quite easy As found here: javacodez.proboards.com/index.cgi?board=proboardcodes&action=display&thread=515 I have used one. The code part for a if location is the following. So using our tags: <script type="text/javascript"> <!-- //If Location threads
if (location.href.match(/thread=NUM/)) {
SOME CODE HERE FOR THIS THREAD
}
//--> </script>
So what this has done one you put a ID number in NUM part and put this code in the header or footer of the board you want to use this in it will make what ever is in between the { } only show on one thread. So how to use this? Where it says NUM put the ID number of the thread. So for eg this: javacodez.proboards.com/index.cgi?board=proboardcodes&action=display&thread=515Would be: if (location.href.match(/thread=515/)) {
SOME CODE HERE
}
So I hope this has helped and sorry the lesson was quite short but your can't really explain anymore on If locations. Next time we will hopefully be back onto varibles but will be learning the ProBoard Varibles
|
|
Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Mar 11, 2010 18:14:03 GMT 12
Just quickly reminding before I write up the next lesson if your stuck and don't understand please post your question in the help board. This is in the coders lounge as a sub-board
|
|
Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Mar 14, 2010 17:22:36 GMT 12
Lessons will be stopping till I get my lessons in my office up to this point
|
|
Mark
Junior JGFX Member
[M:0]
Posts: 122
|
Post by Mark on Apr 24, 2010 17:23:11 GMT 12
When will they be starting up again?
|
|
Admin
Forum Head
The Head Admin[M:0]
Just trying to help people out with coding stuff
Posts: 1,927
|
Post by Admin on Apr 27, 2010 19:42:12 GMT 12
I'm not sure, I'm finding time on the computer limited from homework and TalkaForums Hopefully soon when I find spare time
|
|
Lucy
Brand New JGFX Member
[M:0]
Posts: 37
|
Post by Lucy on Apr 27, 2010 19:43:45 GMT 12
I hope thats soon! Mark and I might start to learn to code which will be fun You should make a thread in your office or something about TalkaForums so we can see what your up too
|
|