activate javascript

css , java United States
  • 18 years ago

    i know how to activate a javascript when the body loads...


    <body onload="somejavascript()">


    but my problem is... how can i activate a javascript without body onload or clicking anything... just flat out excecuting it, such as something like this


    document.writeln("Welcome")


    and then maybe do that a couple more times without clicking anything. any suggestions?

  • 18 years ago

    Well, i am not very good on these... but i thing that you can use everywhere dosument.writeln("Welcome, and it will be called, when the prograzm will arrive at this line, as each line in the file...


    But i am not sure for that...


  • 18 years ago

    you can do it this way


    Code:

    <html>
    <body>
    This is my
    <script langauge="javascript">
    <!--
    document.write("javascript");
    -->
    </script>
    test page.
    </body>
    </html>


  • 18 years ago

    Well, actually that was exactly what i was meaning above, but it is more clear...


Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“An expert is a man who has made all the mistakes that can be made in a very narrow field” - Niels Bohr