Category Archives: Web Development

Prompt Dialog Box in JavaScript

 
Suppose you want to require user interaction on the webpage for example if you want to display a dialog box that has some predefined message, a textbox that accepts user input and Ok and cancel button then we can use prompt dialog box in JavaScript.we know that Alert dialog box simply dislays information in a browser and does not allow any user interaction.
In prompt dialog box if user click on ‘Ok’ button then text types inside the textbox will be pass to the program environment otherwise if user click on ‘Cancel‘ button then it return null to the environment.

Prompt() method requires two blocks of information:
A message to be displayed as a prompt to the user
Any message to be displayed in the textbox, this is optional.
we can use Prompt() in JavaScript as:

prompt(“message“,”default value“)

Example:

<html>
  <head>
    <title>example</title>
  </head>
  <body>
    <script language="javascript">
       document.write("<H1>Welcome,");
       document.write(prompt("Please enter your name :"," Name"));
    </script>
  </body>
</html>

Advantages of JavaScript

 Java script is an object oriented language that allows creation of interactive webpages.

Java script gives many advantages to a web developer such as:

 

·         This is an interpreted language which requires no compilation steps, so this provides an easy development process. This language is completely interpreted by the browser.

 

·         Easy debugging and testing, JavaScript can test line by line. It is very easy to locate errors.

  Continue reading Advantages of JavaScript

The Strict Equality Operators

 

JavaScript introduces two new operators, the strict equality operators.
The strict equality operators (=== and !==) perform equality comparisons on operands of the same type. No type conversion is performed before the comparison. They should be both Integer, String, or any other JavaScript type:

operand1 === operand2
operand1 !== operand2

Continue reading The Strict Equality Operators

Basic SEO tips for ASP.NET website

 

SEO has become the most important thing for any website nowadays and as ASP.NET is growing, SEO has become a hot topic among ASP.NET developers.
The world of Search Engine Optimization (SEO) keeps on changing continuously, we can say this as for example can you imagine that last year Google published 450 updates to it’s search engine algorithms?
Though the SEO trend is continuously changing still there are some key points that have been fundamental and unchanged so far.
Here i have mentioned few points which should be kept in mind to implement proper SEO in your ASP.NET site:-

1. Page titles

One of the most important things are page titles (between tags). When somebody is searching something then these titles are shown as links in search results. One of the common mistakes is using same title for all pages. Imagine how worthless are the following search results for user.

Hello World
Some fragments from page that may not be useful for user.

Hello World
Some other fragments from page as description.

Hello World
Almost no content, let’s show what we have. Date Modified 01/19/2008 Titles by Marc and Lewis Custom services. Continue reading Basic SEO tips for ASP.NET website