Monday, March 22, 2010
Ajax Cache-Problem with Internet Explorer.
Include those lines into php file.
header('Pragma: no-cache');
header('Cache-Control: no-cache');
header('Expires: 0');
header('Pragma: no-cache');
header('Cache-Control: no-cache');
header('Expires: 0');
Thursday, March 11, 2010
Wednesday, March 10, 2010
IE7 problem For select Box
document.getElementById("prabhag_Bill").options[document.getElementById("prabhag_Bill").selectedIndex].text;
Monday, March 8, 2010
Browservise innerText and textContent
var browserName=navigator.appName;
var browserVer=parseInt(navigator.appVersion);
if(browserName=="Netscape")
var curentArea = currentTd.parentNode.cells[currentColoumnIndex].textContent; if(browserName=="Microsoft Internet Explorer")
var curentArea = currentTd.parentNode.cells[currentColoumnIndex].innerText;
var browserVer=parseInt(navigator.appVersion);
if(browserName=="Netscape")
var curentArea = currentTd.parentNode.cells[currentColoumnIndex].textContent; if(browserName=="Microsoft Internet Explorer")
var curentArea = currentTd.parentNode.cells[currentColoumnIndex].innerText;
innerText and textContent
Use the following code in javascript to acquire the same functionality as innerText.
var myText = document.getElementById(’divText’).textContent; // same as innertext.
Saturday, February 20, 2010
String In Java
public class StringBufferOperation{
public static void main(String[] args){
StringBuffer strBuf1 = new StringBuffer("Prashant");
System.out.println("strBuf " + strBuf1); //printing Prashant
System.out.println("strBuf " + strBuf1.capacity());//16(default capacity) + 8 characters of 'Prashant' ie.24
System.out.println("strBuf " + strBuf1.length());//showing length of string 'Prashant' ie. 8
System.out.println("strBuf " + strBuf1.charAt(5));//showing character at position 5 ie. 0-5 ie.'a' in string 'Prashant'
System.out.println("strBuf " + strBuf1.toString());//converts to a string representing the data in this string buffer.
strBuf1.delete(3,5);
System.out.println("strBuf " + strBuf1);//Printing Praant.
strBuf1.insert(2,'c');
System.out.println("strBuf " + strBuf1);// Printing Prashant as Prcashant
strBuf1.setCharAt(0,'r');
System.out.println("strBuf" +strBuf1);//It will Printing rrcshant.
//replace(int start, int end, String str)
// reverse()
//append(String str)
//setLength(int newLength)
}
}
public static void main(String[] args){
StringBuffer strBuf1 = new StringBuffer("Prashant");
System.out.println("strBuf " + strBuf1); //printing Prashant
System.out.println("strBuf " + strBuf1.capacity());//16(default capacity) + 8 characters of 'Prashant' ie.24
System.out.println("strBuf " + strBuf1.length());//showing length of string 'Prashant' ie. 8
System.out.println("strBuf " + strBuf1.charAt(5));//showing character at position 5 ie. 0-5 ie.'a' in string 'Prashant'
System.out.println("strBuf " + strBuf1.toString());//converts to a string representing the data in this string buffer.
strBuf1.delete(3,5);
System.out.println("strBuf " + strBuf1);//Printing Praant.
strBuf1.insert(2,'c');
System.out.println("strBuf " + strBuf1);// Printing Prashant as Prcashant
strBuf1.setCharAt(0,'r');
System.out.println("strBuf" +strBuf1);//It will Printing rrcshant.
//replace(int start, int end, String str)
// reverse()
//append(String str)
//setLength(int newLength)
}
}
Subscribe to:
Posts (Atom)