Results 1 to 4 of 4

Thread: JAVASCRIPT:preloader()->help please

  1. #1

    JAVASCRIPT:preloader()->help please

    Hi
    First of all i am begging for help,please baas , please

    1)))))) My javascript codes wont execute......???
    I dont know why, i made the codes exactly as my material's example.
    This is only for my codes that are inside the script block in the head,
    my IN-LINE codes works fine.(please see the example below, then check wha i'm doing wrong)

    2))))))How do i use the preloader() array???
    I know how to specify the preloader and all but how do i use it inside of my HTML with
    theROLLover effect???(please see the example below, then check wha i'm doing wrong)


    Ok, just used the ALERT() in both functions to check whether it works(and it doesnt)
    --------------------------------------------------------------------------------------------------------
    ex1:

    <html>
    <head>
    <SCRIPT TYPE="text/javascript">
    <!--
    function picload() {
    var pics = new Array("butbusover.gif","butbus.gif",""butaccover.gif","butACC.gif","butccover.gif","butCC.gif","butwebover.gif","butWEB.gif");
    var preload = new Array();
    for(var i = 0; i < pics.length; i++){
    preload[ i ] = new Image();
    preload[ i ].src= pics[ i ];
    alert();
    }
    function twee(){
    alert();
    }

    }

    //-->
    </script>
    </head>

    <BODY background="star.gif" bgcolor="black" text="white" onload="picload()" >
    <table border="0">
    <tr>
    <td colspan="35" align="center">[img]butBUS.gif[/img]
    </td>
    <td colspan="40" align="center"><a href="accounting/accounting.html" TARGET="main" ONMOUSEOVER = document.images.acc.src="butaccover.gif" ONMOUSEOUT = document.images.acc.src="butACC.gif" >[img]butACC.gif[/img]
    </a>
    </td>
    <td colspan="50" align="center">[img]smmelogo.gif[/img]
    </td>
    <td colspan="40" align="center">[img]butCC.gif[/img]
    </td>
    <td colspan="40" align="center">[img]butWEB.gif[/img]
    </td>
    </tr>
    </table>


    </BODY>
    </HTML>
    ------------------------------------------------------------------------------------------------------------

    So what could it be?? please help

  2. #2
    Junior Member
    Join Date
    Jul 2003
    Posts
    13
    Bah, Don't use that... Do something simple....

    Code:
    <script language="JavaScript">
    <!--
    
    function PreloadImages() {
      var Bild1 = new Image();
      Bild1.src = "image1.gif";
      var Bild2 = new Image();
      Bild2.src = "image2.gif";
      }
    
    //-->
    </script>
    <body onload="PreloadImages()">

  3. #3
    thanx,i'll try that.

    Tell me what should i use: LANGUAGE="javascript" or TYPE="text/javascript"???

    or should i use both( like AO does)

  4. #4
    ok if i add LANGUAGE to my scripts they work(number 1 solved) but my material says i should not use it ,cause its on its way out

Posting Permissions

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