Home -> Workshop -> NJIN -> Chat

[overview] [next] [previous]

Chat Session Transcript

wachsmut I made a very simple homepage, that we will enhance with some simple JavaScript commands. First, take a look at the simple page (or the code for it) ... hang on
wachsmut It's a simple page, showing only one headline ....can you all see the code ?
buttery yes
saccoman yes
jacobson yes
handerha no
wachsmut Dave, switch your Netscape (or Web Broswer) to the address above …
divito yes
swift yes
handerha i see it
wachsmut Next, copy the code starting with <HTML> and paste it into a notepad document ...So: Start NotePad - Switch to Netscape - Mark everything starting from <HTML> to </HTML> - Select EDIT-COPY - Switch to Notpad - select EDIT-PASTE - save as TEST.HTM - then switch to Netscape - then 'load file' test.htm.- Everyone working ? Please say 'yes' when done ...
handerha Yes
buttery i'm done with it
saccoman I got it also.
swift yes
divito yes
wachsmut Sue, are you done ??? Well, maybe we 'lost' Sue ????? Anyway, here's the 'next' improvement, which has some little JavaScript in it. JavaScript is 'code' that you attach via 'handlers' to your page. In this example (look at netscape).
wachsmut I have used the method 'onLoad' and attached it to the <BODY> tag. The effect is simple: when the page loads, the 'alert' function will start and it displays a simple alert box to the users. Modify your file to reflect this simple JavaScript enhancement NOW, please save the Notepad file, switch to Netscape, and reload your 'new' page
buttery copy and paste it, bert?
wachsmut Yes, that would do, copy and paste ...
jacobson yes I'm done
wachsmut If you typed it, watch the 'single and double' qoutes
buttery done
wachsmut Sue, did you see the FIRST page, or did you already make the modifications ?
saccoman done
wachsmut If you are done, you should have seen the simple message box... did it work ?
buttery well I have to get going now, but I am going to leave my computer on and my session is being logged, so I'll take a look at what we covered later on
wachsmut Good
swift where is the altert function
jacobson ok
wachsmut Alright, Dave's still there, I hope ????? Here's how it works !!!
handerha I/m here
wachsmut 'alert' is part of JavaScript, and Netscape has a built-in JavaScript interpreter So, Netscape will interprete JavaScript code, if that code is

'designated' by special tags as Java Script code. Of course, you can also write your own 'functions' and then execute them either via 'event handlers' or directly in your document. To illustrate, take a look at Netscape now ....

wachsmut You should see, in the <HEAD> section, the tag <SCRIPT ....That defines a new JavaScript function, which does not execute, however. Further down in the doucment, there is the <SCRIPT> tag again, and there it says: execute the function defined above. So, Please modify your page to incorporate these changes. Anyone with Netscape 2 or better, any platform, can see JavaScript. Other browsers may incorporate JavaScript, but have not yet done so. Please let me know when you are done ...
saccoman done
wachsmut Everybody done ???? Seen the date, and the alert box ?
handerha Yes
saccoman y
divito yes
swift yes
jacobson yes
wachsmut Great. Here's the last improvment ... I have included a button and another event handler 'onclick' to that button that brings up antoher dialog box. It could also execute more complicated functions that were define in the HEAD section of the document Okay, the document should now show in Netscape.
wachsmut Again, please incorporate those changes into your document and let me know when you are done. Finally, here's the 'complete' reference to JavaScript … technical and difficult.
swift works for me too
buttery ok
divito works good for me.
wachsmut So, here the doucmentation for JavaScript, should show up in your Netscape window now ....
wachsmut This concludes the official part of this class. I want your homepage, eventually, but hopefully on Tuesday already, to include some JavaScript. You could use some of today's examples, or come up with more elaborate stuff yourself. You have examples, the complete documentation, so you should be fine. I'll stick around for another 10 minutes for questions ....
divito Eveything seems pretty clear to me - I'll see you all later - byby
jacobson thanks Bert. See you Tuesday! bye all
swift See everyone on Tuesday...bye
wachsmut. Bye everyone, I am signing off now

[overview] [next] [previous]


Bert G. Wachsmut
Last modified: 05/03/00