I want to know about the java code. Help please!!!!

Reply

Join Date: Feb 2007
Posts: 53
Reputation: Hellodear is an unknown quantity at this point 
Solved Threads: 0
Hellodear's Avatar
Hellodear Hellodear is offline Offline
Junior Poster in Training

I want to know about the java code. Help please!!!!

 
0
  #1
Feb 19th, 2007
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)
Attached Files
File Type: txt javascript.txt (2.5 KB, 6 views)
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,177
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 479
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: I want to know about the java code. Help please!!!!

 
0
  #2
Feb 19th, 2007
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/tutor...let/index.html
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 53
Reputation: Hellodear is an unknown quantity at this point 
Solved Threads: 0
Hellodear's Avatar
Hellodear Hellodear is offline Offline
Junior Poster in Training

Re: I want to know about the java code. Help please!!!!

 
0
  #3
Feb 19th, 2007
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)
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,177
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 479
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: I want to know about the java code. Help please!!!!

 
1
  #4
Feb 19th, 2007
Last edited by peter_budo; Feb 19th, 2007 at 9:00 am.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,332
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 249
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: I want to know about the java code. Help please!!!!

 
0
  #5
Feb 20th, 2007
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.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 53
Reputation: Hellodear is an unknown quantity at this point 
Solved Threads: 0
Hellodear's Avatar
Hellodear Hellodear is offline Offline
Junior Poster in Training

Re: I want to know about the java code. Help please!!!!

 
0
  #6
Feb 20th, 2007
Originally Posted by masijade View Post
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?
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,332
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 249
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: I want to know about the java code. Help please!!!!

 
0
  #7
Feb 20th, 2007
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.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC