Tuesday, March 29, 2011

CSS and round corners: Boxes with curves

One of the main reasons for having to use images on any web page is to create curves and round corners. It's currently impossible to create any kind of curved shapes using just HTML, so images need to be used. Putting these images into the HTML document with a table layout can create a large amount of superfluous code.

Using the power of CSS we'll create the following box with round corners, without an tag in sight:

Lorem ipsum dolor sit amet consectetur adipisicing elit

How it works

The above box is basically a normal box with an orange background colour and four corner images superimposed on top. All these images have been called up through CSS commands. So, we start off with:

Lorem ipsum dolor sit amet consectetur adipisicing elit

We've used class="bl" as we're going to assign our bottom left corner to this

through a CSS command. As a rule, you can only assign one background image to an HTML tag with CSS, so this is the only image we'll assign to this
. We'll use this image Bottom-left curve and call it bl.gif, and then place it in the bottom-left corner with this CSS command:

.bl {background: url(bl.gif) 0 100% no-repeat; width: 20em}

The CSS background command is broken up into three sections: the image URL, its position, and a repeat command. We also inserted a width CSS command so the box doesn't cover the whole width of the screen. Let's examine the three background commands in turn:

  1. Image URL - Remember, the image is being called up through the CSS so the path to the image is from the CSS document and not the HTML document.
  2. Image position - In this example, we've used the command 0 100% in our CSS rule. The first number represents the distance from the left edge of the
    and the second number the distance from the top edge. In this instance % was used, but a different distance value such as em or px could have been used instead. If this command was left out then the default value, 0 0 would be used and the image would be placed in the top-left corner.
  3. Repeat command - Obviously we don't want this image to repeat, so we inserted the no-repeat CSS command. If we wanted to, we could have used repeat-x, to repeat the image horizontally, repeat-y, to repeat it vertically, and repeat to repeat it both horizontally and vertically. If this command was left out then the default value, repeat would be used.

It doesn't matter in which order these three CSS background commands are placed. Our box with curves now looks like:

Lorem ipsum dolor sit amet consectetur adipisicing elit

Monday, March 21, 2011

how change html content onclick menu

<html> <head> <title>Change iFrame Contents</title> <script language="JavaScript" type="text/javascript"> <!-- function changeFrame(newPage){ document.getElementById('myframe').src = newPage + ".html"; } //--> </script> </head> <body> <div align="center"> <span id="menu"> <a href="#" id="default" onClick="changeFrame(this.id)">Home</a> <a href="#" id="about" onClick="changeFrame(this.id)">About</a> <a href="#" id="contact" onClick="changeFrame(this.id)">Contact</a> </span> <br><br> <iframe src="default.html" id="myframe"> You can't see iFrames :( </iframe> </div> </body> </html>

Thursday, March 17, 2011

Executable .jar Files

import java.awt.*;
import java.awt.event.*;

public class MyClass {
public static void main(String[] args) {
Frame f = new Frame();
f.addWindowListener
(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
);
f.add(new Label("Hello world"));
f.setSize(200,200);
f.setVisible(true);
}
}

Tuesday, March 15, 2011

Creating Executable Jar file In Java

Creating a jar File in Command Prompt

  1. Start Command Prompt.
  2. Navigate to the folder that holds your class files:
    C:\>cd \mywork
  3. Set path to include JDK’s bin. For example:
    C:\mywork> path c:\Program Files\Java\jdk1.5.0_09\bin;%path%
  4. Compile your class(es):
    C:\mywork> javac *.java
  5. Create a manifest file:
    C:\mywork> echo Main-Class: DanceStudio >manifest.txt
  6. Create a jar file:
    C:\mywork> jar cvfm DanceStudio.jar manifest.txt *.class
  7. Test your jar:
    C:\mywork> DanceStudio.jar

Monday, March 14, 2011

Disable menu bar items of Browser

window.open("http://www.facebook.com/home.php",'example','width=350, height=360, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no, left=10,top=10')

disable save as menu in IE browser

Monday, March 7, 2011

Web-Based Image Slideshow using JavaScript

Web-Based Image Slideshow using JavaScript



More Info click Above link:::::::::::::

Bind Some Event to Element and trigger that function when click the element

Scenario: Suppose if we used same click event function in various web pages. if you want do some logic some page button for that need to re...