Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Java.

Talk:Java

From MoodleDocs

I don't know much about Java. But I have been playing around with Wink that creates Flash presentations. I saw Peter Lawson's post in Lesson and realize that I have seen this kind of advice before. I hope someone who really know what they are doing will edit this page. Ooops, I will go back and add a stub --Chris collman 16:31, 13 October 2008 (CDT)

Don't confuse Java & Javascript

Hey people: There's a tendency on these pages to confuse Java and Javascript,. These are not the same thing at all.

Javascript is a fairly simple scripting language, developed years ago by Netscape, and supported natively by virtually all web browsers. You can insert Javascript directly into HTML; no plug-ins or external applications are required for it to work, so long as Javascript support is enabled in the user's browser (and it usually is).

Java is a programming language developed by Sun microsystems. You can't insert Java directly into HTML. A Java Applet, which has been programmed using the Java language and compiled externally, can be embedded in a web page (like a video or Flash object), but whether it works or not depends on the end-user having an external Java client installed on his/her computer.

Some web sites also use Java server applications, but that's yet another animal.

Javascript is what makes "dynamic html" effects possible (drop menus, etc.)

Java applets on the web are more like miniature applications -- such as image editors, or of interactive media. In this way, it's again similar to Flash or Shockwave multimedia objects. -- Garry Barrow 10:54 17 Feb 2009

Draft insert Java script into lesson page

Here is what Peter wrote in the Lesson Forum:

I used javascript to popup a fullscreen window for my flash presentation. I first built a standard pair of html pages on my desktop. one has the script in the head of the document and a scipt link in the body. the other is the pae that plays the flash presentation with a standard form with a close window button.

Once these were working on my desktop I logged into moodle and opened the html editer at the location I wanted. I wrote what I wanted to see and then switched to html view using the <> button.

I pasted the scripted link in the body at the appropriate place.

Problem with this htmnl editor is tht you dont have a head section so I copied the head section with its script and pasted it into the editor in one piece at the top.

Saved and closed and off it went no probs.

Moodle seems to change the script and makes the head invisible again but s long as you dont try and edit that again it seems to work fine.

If you decide to edit the page then you will have to replace the link script getting rid of what moodle changed it to and re add the head script including the <head> tags

Thanks Peter --Chris collman 16:31, 13 October 2008 (CDT)