Hello,
I am a newb of Java applets. In the recent day, i got with a java code and is working properly with my current web page.
I'm herewith attaching that source code. You just cut and paste it, save it as name.htm, and run it. Interesting pop up. am i right?

But i don't know how it is working. i had a look at the java section. but can't! Anybody can help, to describe the java (<script>....</script>) section of the said script??
Anish V
(New Delhi, India)

Recommended Answers

All 6 Replies

The text file which you attached is no a java stuff, it is a HTML with additional JavaScript functionality.
What are differences:

  • Java is an object-oriented programming language developed by Sun Microsystems in the early 1990s. Java applications are compiled to bytecode, which at runtime is either interpreted or compiled to native machine code for execution. (material from wikipedia.org)
  • JavaScript is the name of Netscape Communications Corporation's and now the Mozilla Foundation's implementation of the ECMAScript standard, a scripting language based on the concept of prototype-based programming. The language is best known for its use in websites (as client-side JavaScript), but is also used to enable scripting access to objects embedded in other applications. (material from wikipedia.org)

To learn about JAVA Apllets check this http://java.sun.com/docs/books/tutorial/deployment/applet/index.html

Thanks Peter! I got the website that you has introduced. But you didn't mind what I have asked. I seek help from the script that i had attached:

var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all
function drag_drop(e)
{
if (ie4&&dragapproved)
{
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
return false
}
else if (ns6&&dragapproved)
{
crossobj.style.left=tempx+e.clientX-offsetx+"px"
crossobj.style.top=tempy+e.clientY-offsety+"px"
return false
}
}
-----------------------------------------------------
THIS ONE!! From where can i find the tips about 'var', 'document.all','getelementbyid'? Did you notice that? If u can give me the link of the study materials so that i can reach there......

Anish V
(New Delhi, India)

And, of course, as mentioned in peter_budo's first post, that is JavaScript, not Java. Java != JavaScript. Find a JavaScript forum somewhere, rather than a Java Forum.

And, of course, as mentioned in peter_budo's first post, that is JavaScript, not Java. Java != JavaScript. Find a JavaScript forum somewhere, rather than a Java Forum.

masijad,
Can you clarify what you have mentioned?

JavaScript and Java are two different programming languages. The name is similar, but they were developed by two different companies. JavaScript purposely took on that name to "ride the Java wave", but it has only syntactical similarities. It is not the same language. Google search for a forum dedicated to JavaScript and post your question there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.