| Next Tip?
Home » Archive

Articles in the Javascript Category

Javascript »

[18 Oct 2009 | No Comment | 465 views]

Using the window.open method by Gaurav Arora
The syntax of the window.open method is given below:
open (URL, windowName[, windowFeatures])
URL
This is the URL of the page which open in the new window.
It could be blank.
windowName
A name to be given to the new window.
The name can be used to refer this window again.
windowFeatures
It contains the various window
features for the popup window i.e. status bar, address bar etc
The following lines of code, open a new browser window with standard features :
window.open (“http://interview.msdotnetheaven.com”,”MsDn Interview Questions”);
Changing the features of the Popup
By using …

Javascript »

[2 Jul 2009 | 3 Comments | 1,079 views]

The following code shows how on button click event we can change the background color of the page.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>html xmlns=”http://www.w3.org/1999/xhtml” >
<head>
<title>Changing the Backgound color on Button Click–Meetu</title>
<script language=”javascript” type=”text/javascript”>
function prog1()
{
document.bgColor=“red”;
}
function prog2()
{
document.bgColor=“green”;
}
</script>
</head>
<body>
<input id=”Button1″ type=”button” value=”green” onclick=”prog2()” />
<input id=”Button2″ type=”button” value=”red” onclick=”prog1()” /></body></html>
Thanks and Regards
Meetu Choudhary
Go Green Save Green
Tweet This Post

Javascript »

[18 Jun 2009 | 2 Comments | 226 views]

Code for script section in the head
<script type=“text/javascript” language=“javascript”>
function moveindex() {
var me2 = document.selection.createRange();
me2.moveStart(“character”, 200);
me2.select();
}
</script>
code for calling the function in the body section
&lt;asp:TextBox ID=”TextBox1″ runat=”server” onfocus=”moveindex()”/&gt;
Thanks and Regards
Meetu Choudhary
Tweet This Post

Get Adobe Flash playerPlugin by wpburn.com wordpress themes