7/31/08

JScript

Alert Message Box The alert method has one argument, the string of text you want to display to the user. The string is not HTML. The message box provides an OK button so the user can close it and is modal, that is, the user must close the message box before continuing. window.alert("Welcome! Press OK to continue."); Confirm Message Box The confirm message box lets you ask the user a "yes-or-no" question, and gives the user the option of clicking either an OK button or a Cancel button. The confirm method returns either true or false. This message box is also modal: the user must respond to it (click a button), and thereby close it, before proceeding. var truthBeTold = window.confirm("Click OK to continue. Click Cancel to stop."); if (truthBeTold) { window.alert("Welcome to our Web page!"); } else window.alert("Bye for now!"); Prompt Message Box The prompt message box provides a text field in which the user can type an answer in response to your prompt. This box has an OK button and a Cancel button. If you provide a second string argument, the prompt message box displays that second string in the text field, as the default response. Otherwise, the default text is "". Like the alert( ) and confirm( ) methods, prompt displays a modal message box. The user must close it before continuing. var theResponse = window.prompt("Welcome?","Enter your name here.");

JScript

Using alert, prompt, and confirm Use alert, confirm, and prompt message boxes to obtain input from your user. The boxes are methods of the interface window object. Because the window object is at the top of the object hierarchy, you do not actually have to use the full name (for example, "window.alert()") of any of these message boxes, but it is a good idea to do so, because it helps you remember to which object they belong.

7/29/08

Colorful & Beautiful Peacock

7/28/08

JavaScript and Object Oriented Programming

JavaScript and Object Oriented Programming (OOP) Credits: This tutorial is written and contributed by Tim Scarfe. Edited by JavaScriptKit.com for content/ structure. Please see footnote for more information on author. JavaScript is an excellent language to write object oriented web applications. It can support OOP because it supports inheritance through prototyping as well as properties and methods. Many developers cast off JS as a suitable OOP language because they are so used to the class style of C# and Java. Many people don't realize that JavaScript supports inheritance. When you write object-oriented code it instantly gives you power; you can write code that can be re-used and that is encapsulated. What's so great about objects? Objects work so well because they act just like real life objects- objects have properties and methods. So if we were talking about a lamp, a property of it may be its height or width, say 12cm. A method of it may be to shine (an action). And when it's shining, its brightness property would be of a greater value than when it wasn't. JavaScript gives you the ability to make your own objects for your own applications. With your objects you can code in events that fire when you want them to, and the code is encapsulated. It can be initialized any amount of times. Creating objects using new Object() There are several ways to create objects in JavaScript, and all of them have their place. The simplest way is to use the new operator, specifically, new Object(): We define a custom object "person," then add to it its own properties and method afterwards. In this case, the custom method merely initializes two more properties. Creating objects using Literal Notation Another inline way of defining an object is via literal notation. Supported in JavaScript1.2 and above, it's a more robust form of creating an object on the fly: Literal notion can contain arrays or arbitrary JavaScript expressions or values. While using the new operator or literal notion to create a custom object is both simple and logical, the biggest shortcoming is that the result is NOT reusable- we cannot easily initialize different versions of the created object. For example with the first demonstration above, if the person's name is not "Tim Scarfe", we would need to redefine our entire object just to accommodate this change.

Sending e-mail with attachments from an ASP.NET page

The task of sending e-mails has become much easier in ASP.NET. In previous versions of ASP we either used a third party component or the limited functionality of CDONTS component for sending emails. The .NET framework provides simpler but powerful class libraries for sending emails. These classes are in the System.Web.Mail Namespace. Following table lists the classes and their use : Class Purpose MailAttachment To construct an email attachment. MailMessage To construct an email message. SmtpMail To send an email attachment using the SMTP mail service. High-end commercial email component : i. AspEmail : Most feature-rich mailing component. Supports message queueing, embedded images, secure mail, authentication. Read more. In order to access these classes we have to import the System.Web.Mail namespace within our ASP.NET page using the import directive as shown below : <% @ Import NameSpace = "System.Web.Mail" %> Then we construct an email message by creating an Instance of the MailMessage class as shown below : MailMessage MyMail = new MailMessage(); The MailMessage class has various properties which need to be set before sending emails. Following table shows some of the important properties of the MailMessage class : Property Description Attachments List of attachments that is sent with the email. Body Body of the email message. From Email address of the sender. Subject Subject line of the email message. To Email address of the recipient. To send an attachment with email we need to create an instance of the MailAttachment class. We pass the full path of the file to be attached as an argument to the constructor of MailAttachment class as shown below : MailAttachment MyAttachment = new MailAttachment("C:\\My Folder\\MyFile.txt"); Note : The file name passed should be valid file which exists on the server. This MailAttachment instance is then attached to the mail by using the Attachment property of the Mail class as shown below : MyMail.Attachments.Add(MyAttachment); Finally we send the email using the Send() method of the SmtpMail Class as shown below : SmtpMail.Send(MyMail);

Bride Mehndi Design

Bride Mehndi Design

Bride Mehndi Design

funny

rose

Importance of friendship

BramhaKAMAL

Flower

BramhaKAMAL

BramhaKAMAL

Bride Mehndi Design

Bride Mehndi Design

7/27/08

Flower