PDA

View Full Version : Java and getting it to work



Stonekold
04-23-2008, 02:37 PM
Hi. I amm new to website build and I know how to add the java element but how do you actually get the java to work? I have items on my page and i want the little java *****t to pop up when you click the picture. Being new I have no idea how to do this. Can anyone help? Thanks in advance.

Stone

Watdaflip
04-23-2008, 04:16 PM
Are you asking how to made the java *****t? Or just how to instead of just adding an *****t to a page make it work when you click a picture?

Stonekold
04-23-2008, 08:35 PM
I suppose both. I am not really sure. I want to use pictures on my site so that when you click on the picture you get a small java window that gives additional information about the picture. But in truth both would be helpful.

Stone

Watdaflip
04-23-2008, 11:30 PM
I think you are wanting javascript. Just put an onclick event with code like

window.open ("http://yoursite.com/additional_info.html",
"popup","location=1,status=1,scrollbars=1,
width=500,height=200");

Changing the width and height values to change the size of the window.

Stonekold
04-24-2008, 01:26 AM
Ok, sorry I am asking so many questions, but I am very new to this. Can you give a detailed example? Say, you click on a picture of myself. Up pops a javascript window with a small bio about myself. This is javascript, correct? And what is the difference between java and javascript?
Again thanks for the help.

Stone

Watdaflip
04-24-2008, 02:35 AM
Yes, the code I posted above is javascript. Basically your webpage is made up of html code, which is static in nature. The code I posted above uses an event which has special uses with javascript, onclick being it will before whatever process the code tells your browser to do when you on that element.

So when you are clicking the picture of yourself, you are executing the javascript code, which in this case opens a pop up window of another page on your site that contains your bio.

Javascript is a scripting language run in the browser environment, Java is a high level compiler language which is capable or anything from small web *****ts to full blown applications that you run on your computer.