The >>Official<< HTML/Javascript Thread

Discussion in 'Fan Sites' started by Smuggler-of-Mos-Espa, Dec 5, 2002.

Thread Status:
Not open for further replies.
  1. Smuggler-of-Mos-Espa Jedi Youngling

    Member Since:
    Jan 23, 2002
    star 6
    This will be the official HTML/Javascript thread if moderators allow. Come here to debate, compliment and talk about all forms of HTML and/or Javascript for web sites or for just in general. From complicated to the simplist of forms. I'll start it off for something simple.

    Codes:

    Let's start with javascript pop-ups and the simplest form. To make a javascript alert, you type in 'javascript:alert('Type_your_message_here.')' without the farest comma-quote mark. Just so you know. You type in that into a link spot on your site, but on the boards, just use the '[link=' meathod.

    Through this, you can't literally type in spaces between your message, you have to use the (_) underline mark between words to mark as spaces on the pop up. Here's an example. Click here for the enlightenment of a lifetime.

    Smuggler-of-Mos-Espa
  2. Red_Oktobur Jedi Grand Master

    Member Since:
    Dec 7, 2001
    star 6
    To make a picture in HTML, simply enter the following code:

    <img src="http://youraddressofthepicture.gif">

    And it will appear on your site.

    Also note that in order to make HTML work on your site, open the HTML editor or your Editing program and make sure you put at the top:

    <html>


    And when you end your page, make sure you put a:


    </html>



    to close the tag. If they aren't there, none of your scripts will work.
  3. Red_Oktobur Jedi Grand Master

    Member Since:
    Dec 7, 2001
    star 6
    Oh yeah, I forgot......

    In the Javascript code that SoME just posted, he used underscores (_). If you don't want them to appear. simply put a %20 between every word. Like this:

    javascript:alert("Your%20message%20here.")


    To appear like this:


    As such.
  4. Smuggler-of-Mos-Espa Jedi Youngling

    Member Since:
    Jan 23, 2002
    star 6
  5. JediGaladriel Manager Emeritus

    Member Since:
    Sep 3, 1999
    star 5
    I'm so going to like this thread. I had enough familiarity with HTML that bad teaching didn't bother me for most of my web design class, but I had nothing for javascript, and I completely messed it up. I will be avidly learning this stuff.
  6. Night4554 Jedi Grand Master

    Member Since:
    Oct 9, 2000
    star 5
    Some other JavaScript Commands:

    <script> and </script> the opening, closing tags for javascript.

    language="javascript" the argument for the <script> tag that is needed.

    document.write("Your Text Here"); Writing somehting to the browser.

    ; The semicolon, needed for ending nearly every line of javascript.

    location.href="http://yoururlhere.com"; The code for redirecting.

    var booga; Declaring a variable named booga.

    booga=5; Setting booga equal to 5.

    if(booga==5) {
    document.write("YAY");
    }


    An if statement, used to test for somehting. Note that much of the formatting whitespace and {} is due to a person's preference. I am using the most popular version.

    ¤Night
  7. YodaJeff Manager Emeritus

    Member Since:
    Oct 18, 2001
    star 7
    The following is my opinion, and only my opinion:

    I don't know if I really like an "Official" HTML/JavaScript thread. I think it'd be a lot easier to just answer everyone's questions as they come up in separate threads. It'd be easier to have separate threads for different parts of HTML/Javascript. For example, there could be a thread for frames, and a thread for tables. If there is an "Official" HTML/JavaScript (which are two separate languages, so I don't even know why they're grouped together...) thread, there will be an "Official" Java thread, and before you know it, everything will be covered by an "Official" thread, and there will only be 20 threads in this forum.
  8. Night4554 Jedi Grand Master

    Member Since:
    Oct 9, 2000
    star 5
    I would actually like an *Official* for like SHTML, DHTML, JavaScript, SQL, and the more obscure decisplines. But an Official HTML thread would be extremely cluttered.

    ¤Night
  9. Smuggler-of-Mos-Espa Jedi Youngling

    Member Since:
    Jan 23, 2002
    star 6
    Ok, Night, if you don't feel right about this, feel free to change the title or purpose of this thread.
  10. Night4554 Jedi Grand Master

    Member Since:
    Oct 9, 2000
    star 5
    If that was sarcastic:
    Hey man, those are just my opinions in response to Jeff's post.

    If not:
    Love too ;) But I'm not a mod, You'd have to ask one of the mods in the forum.

    ¤Night
  11. Tupolov Jedi Master

    Member Since:
    May 24, 2002
    star 4
    when posting an image you can also change the height and width by <img src="http://cheese.com" width="45" height="45">
  12. JediGaladriel Manager Emeritus

    Member Since:
    Sep 3, 1999
    star 5
    Shall we call it, like, the official obscure coding thread? :)

    I think it's a good idea. I also think that HTML and javascript would be good to separate.
  13. Night4554 Jedi Grand Master

    Member Since:
    Oct 9, 2000
    star 5
    Since I have a feeling you mods voiced your opinions then dropped it, I think one of you should take action before the thread gets to large.

    ¤Night
  14. LittleJedi Jedi Master

    Member Since:
    Jun 4, 2001
    star 4
  15. AERYN_SUN Jedi Grand Master

    Member Since:
    Apr 1, 2001
    star 5
    i'm not new to making websites, but still, this thread is wonderful and i'm gonna take web design next spring :D

    ooh, the codes and shortcuts i will learn, i'll definitly post them here :D
  16. Smuggler-of-Mos-Espa Jedi Youngling

    Member Since:
    Jan 23, 2002
    star 6
    I've been in webmastering for three years, i have been working on a new site since the summer.
  17. AERYN_SUN Jedi Grand Master

    Member Since:
    Apr 1, 2001
    star 5
    Photo Album/Fan Art Gallery

    ~~

    <iframe name='cwindow' style='border:15 double purple' width=350 height=150 src='doc.htm'></iframe>

    (this last script is to create a scrollable mini-size window)
  18. Smuggler-of-Mos-Espa Jedi Youngling

    Member Since:
    Jan 23, 2002
    star 6
  19. Rox Administrator Emeritus

    Member Since:
    Nov 24, 2000
    star 6
    One thing that I always wanted to know is how do you highlight a link on rollover? Not just changing the text color but highlighting the whole word? I am guessing it has somethign to do with CSS but I am not sure?
  20. Kadue Jedi Grand Master

    Member Since:
    Jun 20, 2000
    star 5
    This should be what you need to add to the CSS:

    a.hover {
    color: link colour; background-color: highlight colour
    }
  21. Rox Administrator Emeritus

    Member Since:
    Nov 24, 2000
    star 6
  22. AERYN_SUN Jedi Grand Master

    Member Since:
    Apr 1, 2001
    star 5
    my host brinkster has a html codebank, but it also stores codes for other forms too.

    Brinkster codebank

    its at the top of the main page, and is divided up into categories.
  23. Yodaminch Force Ghost

    Member Since:
    Mar 6, 2002
    star 5
    i'm not sure if this is the right thread but i am trying to make a countdown clock to episode 3. the code is this:
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var now = new Date();
    var then = new Date();
    var gap = then.getTime() - now.getTime();


    dleft = Math.floor(gap / (1000 * 60 * 60 * 24));

    hleft = Math.floor((gap/(1000*60*60))-(dleft *24));

    document.write("Only " + dleft + " days " + hleft + " hours \'till 11:59 p.m.,);

    //-->
    </SCRIPT>
    here is where i got it
    i have tried repeaedly and have not had any luck. if anyone has a better code please point me toward it. if anyone can make this one work that would be helpful also. thanks.
  24. Daughter_Of_TheForce Jedi Master

    Member Since:
    Sep 1, 2001
    star 4
    I can't get two scripts to operate on the same page (two countdown clocks). Is it even possible to do that?
  25. dark42 Jedi Knight

    Member Since:
    May 16, 2002
    star 3
    It's possible to have 2 clocks, but they can't be the same script. All of the functions and variables need different names, else it won't work correctly.
Thread Status:
Not open for further replies.