Wellcome to my java page____this one is about java_scripting.
Before you start to read i would like you
to try a project i'm in the making off
It involves a guestbook.

Would'nt it be nice just to set one up without asking
for allowance by a provider

 
    As Martin Luther once put it  " I have a dream ".
 

 I would be very pleased if you took your time testing this "guestbook".
It's nothing much, just some silly questions & a send_button.
 

I would like you to tell (in the text_area)
what kind of machine & Browser you had when visiting me.
Just dont expect me to mail you back.. 

But i'll read what you wrote



 
 

 

    So ThankYou on Forehand as we say in Sweden.
 
          click here     ----------    for the guestbook
B U T   P  E  R  H  A  P  S
You
P R E F E R E
it
in
J A V A...
 
                  click here     ----------   the JAVA_guestbook
 
 So what's the Difference
that is So what ???
 
1. In  the Java_guestbook there is two functions that checks if you filled in
          Your E_mail ( @ ) correctly, respectively wrote something in the name"list".
 
2. There is also one function (uppermost) that puts the browsers focus on the
first field of the form. So that the script knows where you are.
 
Just save both pages and compare the sourcecode.
 
 
 
 
 

 

There is no hidden tricks in this/those page(s),
but, as my provider does'nt seem to stop scripts etc etc
from writing over the Server stack, i can't guarante'e that some
happy hacker won't want to play if u get my drift.

As_so_far i'm concerned, there aint a n y_a n y_way (:Tricks that is:) .
java script is fairly simple :). If you know how to write HTML_code,
you know how to to write javascript.
You can look at it as an Extension of those cryptic codes you already
use when shaping a homepage.

As long as you're satisfied with getting results without really knowing why

:) - that is

  This     Is         It...
If you're seriously interested in learning javascript i suggest that you
download webferret (freeware) from my "Links"page and then,
let it search after " javascript" .

You'll be suprised...
 

You should also study the source_code inside my page(s),
 
(; as javascript just are an extension ;) .
 
 

 
 
Well.
Let's check your machines date with some jawa_script.
As i've made this nice background_image i'll just load
time and date in a new window.
 
 
..........Click __here-
 
 If you want to update the time/date you'll have to reload that page..
Further down you'll find another time _script off a somewhat more professional cast.
 

 



 
 

                                Windows

  If you would like to create a new Browser_window with some text in,
  you better check this code out.
 
 

push this   
button
 
It's not much it does right now, but it will have it's uses later..
 
 
The function WinOpen() creates a window by calling the method open.
The first quotes gives the URL of the page  ( the address of your HTML- document)
Leaving it blank allows you to write to it with JavaScript.
The next quotes specify the name of the window.
The quotes after that  specify the properties of the window.
 
If you write       toolbar=yes      it will give you a toolbar in your window.
 
 
Changeable Properties inside your WinOpen() _script are
 
copyhistory
directories
height=pixels
location
menubar
resizable
scrollbars
status
toolbar
width=pixels
 
( a number  like   width=160 wich then will
             decide your windows horizontal size )
 
 
When opened and declared msg   (message)
you can write to your window in normal HTML_code.
Using (java)form_input from your earlier pages
makes it possible to create Forms,
witch outputs new information based on java_input,
without ever being treated inside your providers CGI_scripts.
And that is something of a revolution..
 
 
 
 

 
 
Here is another Fun Windows
a litle more advanced maybe
:)
 
POP UP
 
I've just made some few changes..
 
 
 

 
 
Let's continioue
Maybe i fibbed a litle when i said that, it was so simple.
 

But you must remember that those who makes the really
good Java_scripts, probably already know how to
write "good " structures in other programming_languages.

So they construct "things" like _ Arrays  wich
is a kind of index (pointers to..) for different functions
(; perhaps inside another function  ;)
that you want to keep count on.

Start with the most simple scripts and try to see
what they do.
 
 
 

    A function is some"thing" that you've made
    for Doing something special in your script.
    Those "things" are put outside The HTML_Body.
 
    Let's say you've made three functions
 

F1
F2
F3
 
 
    and then starts your
 

HTML<BODY>

    inside this are your starting_up_code for those functions
    which you are expecting to do the "real work" .
 
 
     so when a "user" calls them
     f ex by clicking on a picture..

calling F1      Function1 will do it's thing
 

                       after it's finnished, it goes to rest
                       and your script waits untill
                       the next "user" call.
 
and the same goes for all your other functions...

< /BODY >        
 

 

(: I won't mind If you would want to exchange the word "user" for "client"
                                                                        and the word "function" to "server" :)


 
 
 
T his type of coding is in fact one of the major things that differ
Windows G U I from Unix_system.
(Graphical user interface (_that's_windows_as_it _looks_out_on_you):)
You have an event_based Operativ_System (OS) if you are using
any of the "Gates_OS:es".
 
By that i mean that your computer allways waits for you
to make decisions before it starts to work.
 
And the same procedures goes for all
your different software from different providers.
 
They all act in the same way and you will find the same type
of buttons at the same place.
 
It does shorten the learning_time when you get new software..
 
I dont want to be mean, but there could have been
a litle more standardisation around Unix.
and a litle less multi_clever scripting_tricks,
 
and different shells,
 
and ways of making
the X_windows  G U I & S H E LL S  interact in,
 
oh so many ways and all at the same time...
 
Well if not for that.
I do belive that it could have been a success.
 
As it is now, it's not.
 
I'ts more of a headache...
If ya get my drift
:)
:):):):):):):) at the wrong time, often in&at the wrong place(S) to..:):):):):):):)
 
 
Still, it's probably the system of choice for those of you that really wants to master it all.
 
 

 
 
Here, i'll show you a beautifull & interesting example on
 
 
a gravitational_Calculator...
Check the source_code.
click ------here
 
 
 
 



 
 

    Okey,   Now we will try another script
                This_one changes the picture on your
                page when your mose moves over it
 
 

               I've put it on  another page so let's
          C  U T  &  C O P Y..... ......sort of
 
 
 
 



 
 
 
 
  Here  is a  another
 
I will load it in another page    ------     and there will the code be to .

 
 
 



 
 
Well, let's do one more. This one i found at a place called Gateway.
We do (nt) enjoy scrolling bars ??
 
dont w :)
 
 
do try    this one :)
 
 
 

 
Here is a nice way of calling your javascript.  You shape your scripts as usual
but instead of saving them in the page where you want the script to be
you save it as a "textfile" ( notepad ) with the extension (f ex) * .js
 
instead of;    *.txt
 
Before you save them txt files, just make shure that you dont leave
 
<SCRIPT language="JavaScript">  " as header inside that text ( *.js ) file
( that is,  nothing left in the text that tell that it is a Javascript)
 
 
 
i will give you the time here in that manner ;)
 
 
 
 
 
and in that page where you want your script to show, you'll just have to make a "call" to
 
(whatever).js
 
 
Here is an example of what a "function call" should look like .
 
<SCRIPT SRC="mine.js">
  </SCRIPT></CENTER>
 
It wont protect your scripts from anybody "knowing".
But now you can use "function calls" instead of having to write
your source code over and over again.
 

 
 
Here is a simple Counter
 
Dont get your hopes up to much now, ya hear...
 
 
 
But it's mine, and, it's nice ?
 
 
 

 
 
His is a strange one.
It seems like the constructor
 
belives that Companies are gonna crave it
Or ? need it..........................................................................;)
 
 
 

 
 
 
Yes
 
i will probably write more,
but as for now :
 
Enough is E.. :)

  Back to Frames
 
 
 

 
 an older version.. without frames
 Let's   go . im thirsty     or first  check those links ?      Osomewhere else HUH