User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 401,951 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,362 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 1253 | Replies: 6
Reply
Join Date: Feb 2007
Location: New Delhi, India
Posts: 53
Reputation: Hellodear is an unknown quantity at this point 
Rep Power: 0
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!!!!

  #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, 5 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,222
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 10
Solved Threads: 270
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!!!!

  #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)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Feb 2007
Location: New Delhi, India
Posts: 53
Reputation: Hellodear is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Hellodear's Avatar
Hellodear Hellodear is offline Offline
Junior Poster in Training

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

  #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  
Join Date: Feb 2006
Posts: 1,375
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 120
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

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

  #4  
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  
Join Date: Feb 2007
Location: New Delhi, India
Posts: 53
Reputation: Hellodear is an unknown quantity at this point 
Rep Power: 0
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!!!!

  #5  
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  
Join Date: Feb 2006
Posts: 1,375
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 120
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

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

  #6  
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  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,222
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 10
Solved Threads: 270
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!!!!

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

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 5:31 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC