Results 1 to 15 of 16

Thread: Intro to JavaScripting and i dont know WTF i did wrong or what to do.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    i n v i s i b l e Tech Admin o_O's Avatar
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    2,957
    Blog Entries
    1

    FFXIV Character

    Humphrey Squibbles (Sargatanas)

    Default

    Oh, colour change, that's pretty easy. I thought you meant you needed the slideshow to start during the loading time. xD

    Give me a few minutes; I'll have something then.

    EDIT:
    Here's the function. This goes in the <head> of the document, because that is the first to be processed by the browser, and we want it to change colour during the loading time:
    <div style="font-size: 9px; color: #CCCCCC; font-weight:bold;">
    &lt;script type="text/javascript">
    function omghi()
    {
    alert('Now changing colour');
    document.bgColor='red';
    }
    &lt;/script>
    </div>
    That says "when you call the function omghi(), alert the user, then change the colour of the background to red.

    Next, we need to call the function. We want it to trigger automatically, so we have to use the :bou::bou::bou::bou::bou::bou: event, which calls a function when the page loads. The :bou::bou::bou::bou::bou::bou: event should be placed inside the &lt;body> tag, because this is what is displayed on the page, and thus, the content whose loading time we are using:
    <div style="font-size: 9px; color: #CCCCCC; font-weight:bold;">
    &lt;body :bou::bou::bou::bou::bou::bou:="omghi()">
    </div>

    Then all we need to do is combine them into a page:
    <div style="font-size: 9px; color: #CCCCCC; font-weight:bold;">
    &lt;html>
    &lt;head>
    &lt;title>Hello&lt;/title>
    &lt;/head>
    &lt;body :bou::bou::bou::bou::bou::bou:="omghi()">
    &lt;/body>
    &lt;/html>
    </div>

    And there you have it.
    Last edited by o_O; 10-19-2004 at 09:45 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •