ASP.NET (35) SQL (25) JAVASCRIPT (24) HTML (14) STYLE SHEET (6) ASP (4) SCRIPT (1)

Search me out HERE!!

To Create WORD FILE and write in it in PHP

Below code is to create WORD file and then write in it. Its simple form, and value entered in Textbox will be written in WORD file.

<?
if($_POST)
{   
    $fp = fopen("test.doc", 'w+');
    $str = "First Name: " .$_POST['fname']."\n";
    $str .= "Middle Name: " .$_POST['mname']."\n";
    $str .= "Last Name: " .$_POST['lname']."\n";
    fwrite($fp, $str);
    fclose($fp);
}
?>

<form method="post">
First Name : <input type="text" name="fname"><br />
Middle Name : <input type="text" name="mname"><br />
Last Name : <input type="text" name="lname"><br />
<input type="submit" name="submit">
</form>

Setting TEXTBOX Background Image and Color Using JavaScript & CSS

Consider below textbox:
<input type="text" id="textbox_name" />

Now you can apply BACKGROUND COLOR or BACKGROUND IMAGE using below JAVASCRIPT or CSS
// USING STYLE CSS
.textbox
{
background-color:#FFFFFF;
background:url(images/test.jpg);
}

// USING JAVASCRIPT
function set_background
{
document.getElementById('textbox_name').style.backgroundColor = '#FFFFFF'; document.getElementById('textbox_name').style.backgroundImage="url(images/test.jpg)";
}

TO FIND BROWSER USING JAVASCRIPT

Using below JavaScript you can get information about browser.

<script language="JavaScript" type="text/javascript">
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    // For IE
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;  // For Firefox
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;  // For Opera
alert(isIE);
alert(isWin);
alert(isOpera);
</script>