DllRegisterServer failed with error code 0x80004005
Posted by Raj
DllRegisterServer failed with error code 0x80004005
I am getting "DllRegisterServer failed with error code 0x80004005" error while trying to register a dll with command prompt in Vista In this tutorial, I will explain how to remove this error.
1.Go to Start
2.Go to All Programs
3.Go to Accessories
4.Run Command Prompt as Administrator
5.Type regsvr32 to register the DLL.
6.Done.
I am getting "DllRegisterServer failed with error code 0x80004005" error while trying to register a dll with command prompt in Vista In this tutorial, I will explain how to remove this error.
1.Go to Start
2.Go to All Programs
3.Go to Accessories
4.Run Command Prompt as Administrator
5.Type regsvr32 to register the DLL.
6.Done.
Palindrome regular expression
Posted by Raj
Palindrome regular expression
A palindrome is a word that is same from front to back and back to front. e.g. Noon
Search for two identical letters, use "\([a-z]\)\1".
The regular expression to match a 5 letter palindrome:
\([a-z]\)\([a-z]\)[a-z]\2\1
A palindrome is a word that is same from front to back and back to front. e.g. Noon
Search for two identical letters, use "\([a-z]\)\1".
The regular expression to match a 5 letter palindrome:
\([a-z]\)\([a-z]\)[a-z]\2\1
PHP preg_replace Example
Posted by Raj
PHP preg_replace Example
preg_replace: Perform a regular expression search and replace.PHP preg_replace() returns an array if the subject parameter is an array, or a string otherwise.
Example 1:
<?php
$string = 'Hello,How r u?';
$string = preg_replace('/\s\s+/', ' ', $string);
echo $string;
?>
Output:
"Hello,How r u?"
Example 2:
<?php
$string = '100 Rs 50';
$pattern = '/(\d+).(\w+) (\d+)/i';
$replacement = '${1}.$3 $2';
echo preg_replace($pattern, $replacement, $string);
?>
Output:
100.50 Rs
preg_replace: Perform a regular expression search and replace.PHP preg_replace() returns an array if the subject parameter is an array, or a string otherwise.
Example 1:
<?php
$string = 'Hello,How r u?';
$string = preg_replace('/\s\s+/', ' ', $string);
echo $string;
?>
Output:
"Hello,How r u?"
Example 2:
<?php
$string = '100 Rs 50';
$pattern = '/(\d+).(\w+) (\d+)/i';
$replacement = '${1}.$3 $2';
echo preg_replace($pattern, $replacement, $string);
?>
Output:
100.50 Rs
HTML interview questions and Answers(Multiple Choice)-HTML Quiz
Posted by Raj
HTML interview questions and Answers(Multiple Choice)-HTML Quiz.
In this section, I have selected advanced HTML interview questions and answers for Freshers and Experienced candidates.Last few months I have been working to select best HTML Job interview question and answer set for IT interview questions.
Multiple Choice HTML interview questions and Answers:
-------------------------------------------------------------------
1.What does HTML stand for?
Ans: Hyper Text Markup Language
-------------------------------------------------------------------
2.Who is making the Web standards?
-------------------------------------------------------------------
3.Choose the correct HTML tag for the largest heading
-------------------------------------------------------------------
4.What is the difference between XML and HTML?
-------------------------------------------------------------------
5.What is the correct HTML tag for inserting a line break?
-------------------------------------------------------------------
6.Can a data cell contain images?
-------------------------------------------------------------------
7.How do I add scrolling text to my page?
-------------------------------------------------------------------
8.What is the preferred way for adding a background color in HTML?
-------------------------------------------------------------------
9.What does vlink mean ?
-------------------------------------------------------------------
10.Is width=”100” and width=”100%” the same?
-------------------------------------------------------------------
11.Choose the correct HTML tag to make a text bold
-------------------------------------------------------------------
12.Choose the correct HTML tag to make a text italic
-------------------------------------------------------------------
13.What is extension of html file ?
-------------------------------------------------------------------
14.What is the correct HTML for creating a hyperlink?
-------------------------------------------------------------------
15.How can we resize the image?
-------------------------------------------------------------------
16.How can you create an e-mail link?
-------------------------------------------------------------------
17.How can you open a link in a new browser window?
-------------------------------------------------------------------
18.Which of these tags are all <table> tags?
-------------------------------------------------------------------
19.Choose the correct HTML to left-align the content inside a tablecell
Ans: <td align="left">
-------------------------------------------------------------------
20.How can you make a list that lists the items with numbers?
-------------------------------------------------------------------
21.How can you make a list that lists the items with bullets?
-------------------------------------------------------------------
22.What is the correct HTML for making a checkbox?
-------------------------------------------------------------------
23.What is the correct HTML for making a text input field?
-------------------------------------------------------------------
24.What is the correct HTML for making a drop-down list?
-------------------------------------------------------------------
25.What is the correct HTML for making a text area?
-------------------------------------------------------------------
26.What is the correct HTML for inserting an image?
-------------------------------------------------------------------
27.What is the correct HTML for inserting a background image?
Ans: <body background="background.gif">
-------------------------------------------------------------------
28.When you count to 15 using hexadecimal numbers, the highest number is what ?
Ans: F
-------------------------------------------------------------------
29.What is the REFRESH meta tag used for ?
Ans: Redirect to a new domain
-------------------------------------------------------------------
30.colspan=n can be added to only what tag?
Ans:<td>
-------------------------------------------------------------------
31.What tag adds a paragraph break after the text ?
Ans:<P>
-------------------------------------------------------------------
32.All HTML tags are enclosed in what ?
Ans: <>
In this section, I have selected advanced HTML interview questions and answers for Freshers and Experienced candidates.Last few months I have been working to select best HTML Job interview question and answer set for IT interview questions.
Multiple Choice HTML interview questions and Answers:
-------------------------------------------------------------------
1.What does HTML stand for?
- Hyperlinks and Text Markup Language
- Home Tool Markup Language
- Hyper Text Markup Language
Ans: Hyper Text Markup Language
-------------------------------------------------------------------
2.Who is making the Web standards?
- Mozilla
- Microsoft
- The World Wide Web Consortium
-------------------------------------------------------------------
3.Choose the correct HTML tag for the largest heading
- <h6>
- <heading>
- <head>
- <h1>
-------------------------------------------------------------------
4.What is the difference between XML and HTML?
- HTML is used for exchanging data, XML is not.
- XML is used for exchanging data, HTML is not.
- HTML can have user defined tags, XML cannot
-------------------------------------------------------------------
5.What is the correct HTML tag for inserting a line break?
- <br />
- <break />
- <lb />
-------------------------------------------------------------------
6.Can a data cell contain images?
- Yes
- No
-------------------------------------------------------------------
7.How do I add scrolling text to my page?
- <scroll>
- <marquee>
- <ciruler>
-------------------------------------------------------------------
8.What is the preferred way for adding a background color in HTML?
- <body background="yellow">
- <background>yellow</background>
- <body style="background-color:yellow">
-------------------------------------------------------------------
9.What does vlink mean ?
- visited link
- vlink
- active link
-------------------------------------------------------------------
10.Is width=”100” and width=”100%” the same?
- Yes
- No
-------------------------------------------------------------------
11.Choose the correct HTML tag to make a text bold
- <bold>
- <b>
-------------------------------------------------------------------
12.Choose the correct HTML tag to make a text italic
- <i>
- <italic>
-------------------------------------------------------------------
13.What is extension of html file ?
- html
- xml
- xhtml
-------------------------------------------------------------------
14.What is the correct HTML for creating a hyperlink?
- <a name="">A</a>
- <a>B</a>
- <a href="http://www.example.com">example</a>
- <a url="http://www.example.com">example</a>
-------------------------------------------------------------------
15.How can we resize the image?
- Using size attribute
- Using height and width
-------------------------------------------------------------------
16.How can you create an e-mail link?
- <mail href="a@b">
- <mail>a@b</mail>
- <a href="a@b">
- <a href="mailto:a@b.com">
-------------------------------------------------------------------
17.How can you open a link in a new browser window?
- <a href="url" new>
- <a href="url" target="new">
- <a href="url" target="_blank">
-------------------------------------------------------------------
18.Which of these tags are all <table> tags?
- <table><head><tfoot>
- <table><tr><td>
- <table><tr><tt>
- <thead><body><tr>
-------------------------------------------------------------------
19.Choose the correct HTML to left-align the content inside a tablecell
- <td valign="left">
- <tdleft>
- <td leftalign>
- <td align="left">
Ans: <td align="left">
-------------------------------------------------------------------
20.How can you make a list that lists the items with numbers?
- <ul>
- <list>
- <ol>
- <dl>
-------------------------------------------------------------------
21.How can you make a list that lists the items with bullets?
- <ol>
- <list>
- <ul>
- <dl>
-------------------------------------------------------------------
22.What is the correct HTML for making a checkbox?
- <checkbox>
- <input type="checkbox" />
- <input type="check" />
- <check>
-------------------------------------------------------------------
23.What is the correct HTML for making a text input field?
- <input type="textfield" />
- <textinput type="text" />
- <textfield>
- <input type="text" />
-------------------------------------------------------------------
24.What is the correct HTML for making a drop-down list?
- <input type="list" />
- <select>
- <list>
- <input type="dropdown" />
-------------------------------------------------------------------
25.What is the correct HTML for making a text area?
- <input type="textarea" />
- <input type="textbox" />
- <textarea>
-------------------------------------------------------------------
26.What is the correct HTML for inserting an image?
- <image src="image.gif" alt="MyImage" />
- <img href="image.gif" alt="MyImage" />
- <img src="image.gif" alt="MyImage" />
- <img alt="MyImage">image.gif</img>
-------------------------------------------------------------------
27.What is the correct HTML for inserting a background image?
- <img src="background.gif" background />
- <body background="background.gif">
- <background img="background.gif">
Ans: <body background="background.gif">
-------------------------------------------------------------------
28.When you count to 15 using hexadecimal numbers, the highest number is what ?
- F
- B
- 15
Ans: F
-------------------------------------------------------------------
29.What is the REFRESH meta tag used for ?
- Refresh your content
- Redirect to a new domain
- rewrite url
Ans: Redirect to a new domain
-------------------------------------------------------------------
30.colspan=n can be added to only what tag?
- <table>
- <td>
- <tr>
Ans:<td>
-------------------------------------------------------------------
31.What tag adds a paragraph break after the text ?
- <PARAGRAPH>
- <P>
- <BR>
Ans:<P>
-------------------------------------------------------------------
32.All HTML tags are enclosed in what ?
- <>
- <?php and ?>
- # and #
- <!-- and -->
Ans: <>
Image upload from url in php
Posted by Raj
Image upload from url in php
In this Article,I will explain how to upload image from url using php.I have written simple script using php functions to upload image from another domain.
Example: Image upload to URL.
<?php
display_errors(0);
$url = "http://www.example.com/logo.jpg";
$file_name= substr($url, strrpos($url,"/")+1,
strlen($url)-strrpos($url,"/")); //Retrive file name from url
$img = file_get_contents($url);//get contents of file
$f = fopen($file_name, 'w');//Open file
fwrite($f, $img);//Write File
fclose($f);
?>
I hope above script will help you to upload image from URL in php.
Cheers :)
In this Article,I will explain how to upload image from url using php.I have written simple script using php functions to upload image from another domain.
Example: Image upload to URL.
<?php
display_errors(0);
$url = "http://www.example.com/logo.jpg";
$file_name= substr($url, strrpos($url,"/")+1,
strlen($url)-strrpos($url,"/")); //Retrive file name from url
$img = file_get_contents($url);//get contents of file
$f = fopen($file_name, 'w');//Open file
fwrite($f, $img);//Write File
fclose($f);
?>
I hope above script will help you to upload image from URL in php.
Cheers :)
PHP RSS Feed Reader using Curl-PHP RSS parser
Posted by Raj
PHP RSS Feed Reader using Curl-PHP RSS parser
In this article,I will explain how to Read RSS feed in php.I have used PHP Curl library to parse RSS feeds with PHP.we can covert rss feed to content using PHP.
Please check below php rss reader example:
<?php
//Used cURL to get the RSS feed into a PHP string variable
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://example.php/rss.xml');
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xml = curl_exec($ch);
curl_close($ch);
$return_data = new SimpleXmlElement($xml, LIBXML_NOCDATA);//I have used the
SimpleXML PHP functions to parse XML documents
$items = count($return_data->channel->item);
for($i=0; $i<$items; $i++)
{
$desc = $return_data->channel->item[$i]->title;
$desc = $return_data->channel->item[$i]->link;
echo $desc = $return_data->channel->item[$i]->description;
}
?>
In this article,I will explain how to Read RSS feed in php.I have used PHP Curl library to parse RSS feeds with PHP.we can covert rss feed to content using PHP.
Please check below php rss reader example:
<?php
//Used cURL to get the RSS feed into a PHP string variable
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://example.php/rss.xml');
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xml = curl_exec($ch);
curl_close($ch);
$return_data = new SimpleXmlElement($xml, LIBXML_NOCDATA);//I have used the
SimpleXML PHP functions to parse XML documents
$items = count($return_data->channel->item);
for($i=0; $i<$items; $i++)
{
$desc = $return_data->channel->item[$i]->title;
$desc = $return_data->channel->item[$i]->link;
echo $desc = $return_data->channel->item[$i]->description;
}
?>
fatal error C1083: Cannot open type library file: 'msxml4.dll': No such file or directory
Posted by Raj
In this section,I will explain how to rectify fatal error `C1083: Cannot open type library file: 'msxml4.dll': No such file or directory`
#import <msxml.dll> named_guids
Replace above code with dll present in your system
OR
upload msxml.dll in your c:\program files\Windows\System32 folder
OR
Replace it with below line.
#import <msxml.tlb> named_guids
OR
Specify the full path for the msxml4.DLL
#import "c:\program files\Windows\System32\msxml4.dll"
#import <msxml.dll> named_guids
Replace above code with dll present in your system
OR
upload msxml.dll in your c:\program files\Windows\System32 folder
OR
Replace it with below line.
#import <msxml.tlb> named_guids
OR
Specify the full path for the msxml4.DLL
#import "c:\program files\Windows\System32\msxml4.dll"
Difference between self join and equi join in Mysql
Posted by Raj
Difference between self join and equi join in Mysql
Self join: Self join is a method of centralizing relational data to a single table.A self-join joins the table to itself.
Self join Example
Equi join: Equi Join is used to combine records from two tables.In equi join we have to use only '=' operator.
Equi Join Example
Self join: Self join is a method of centralizing relational data to a single table.A self-join joins the table to itself.
Self join Example
Equi join: Equi Join is used to combine records from two tables.In equi join we have to use only '=' operator.
Equi Join Example
Equi join in Mysql : Mysql Joins
Posted by Raj
Equi join in Mysql:
Equi Join is used to combine records from two tables.In equi join we have to use only '=' operator.
Example:
SELECT <column_name>
FROM <Table1> , <Table2>
where Table1.column = Table2.column
Equi Join is used to combine records from two tables.In equi join we have to use only '=' operator.
Example:
SELECT <column_name>
FROM <Table1> , <Table2>
where Table1.column = Table2.column
Self join in Mysql : Mysql Joins
Posted by Raj
Self join in Mysql:
Self join is a method of centralizing relational data to a single table.A self-join joins the table to itself.
Example:
CREATE TABLE employees (
NAME VARCHAR(20),
email VARCHAR(20),
mobile VARCHAR(20),
sex CHAR(1),
birth_date DATE,
);
INSERT INTO employees VALUES ('xyz','xyz@example.com','11212','F','1985-06-05');
INSERT INTO employees VALUES ('abc','abc@example.com','11111','M','1985-03-05');
INSERT INTO employees VALUES ('abc1','abc1@example.com','21111','M','1987-03-05');
SELECT e1.name, e2.name,e1.email
FROM employees AS e1, employees AS e2
WHERE e1.email = e2.email AND e1.sex = 'F' AND e2.sex = 'M';
Self join is a method of centralizing relational data to a single table.A self-join joins the table to itself.
Example:
CREATE TABLE employees (
NAME VARCHAR(20),
email VARCHAR(20),
mobile VARCHAR(20),
sex CHAR(1),
birth_date DATE,
);
INSERT INTO employees VALUES ('xyz','xyz@example.com','11212','F','1985-06-05');
INSERT INTO employees VALUES ('abc','abc@example.com','11111','M','1985-03-05');
INSERT INTO employees VALUES ('abc1','abc1@example.com','21111','M','1987-03-05');
SELECT e1.name, e2.name,e1.email
FROM employees AS e1, employees AS e2
WHERE e1.email = e2.email AND e1.sex = 'F' AND e2.sex = 'M';
Format currency using javascript /JQuery
Posted by Raj
Format currency using javascript /JQuery
In this article,I will explain how to Format currency using javascript.it is very easy to format currency in javascript.I have written simple function to format currency in JavaScript.
Example:
<html>
<head>
<title>Format currency (comma seperated) using javascript</title>
<script language="javascript" type="text/javascript">
function FormattedCurrency(currency)
{
var split_num = currency.split('.',2)//Seperate Integer Number and decimal number.
if(isNaN(parseInt(split_num[0])))
{
return 'Please Enter Amount';
}
else
if(parseInt(split_num[0]) < 0)
{
var minus_nummber = '-';
}
else
var minus_nummber = '';
integer = Math.abs(parseInt(split_num[0]));
var number = new String(integer);
var num = [];
while(number.length > 3)
{
var number1 = number.substr(number.length-3);
num.unshift(number1);
number = number.substr(0,number.length-3);
}
if(number.length > 0) { num.unshift(number); }
number = num.join(',');
if(parseInt(split_num[1]).length < 1)
{
currency = number;
}
else
{
currency = number + '.' + parseInt(split_num[1]); }
final_amount = minus_nummber + currency;
alert(final_amount);
}
var currency="1300.40";
var currency=FormattedCurrency(currency);
</script>
</head>
</html>
In this article,I will explain how to Format currency using javascript.it is very easy to format currency in javascript.I have written simple function to format currency in JavaScript.
Example:
<html>
<head>
<title>Format currency (comma seperated) using javascript</title>
<script language="javascript" type="text/javascript">
function FormattedCurrency(currency)
{
var split_num = currency.split('.',2)//Seperate Integer Number and decimal number.
if(isNaN(parseInt(split_num[0])))
{
return 'Please Enter Amount';
}
else
if(parseInt(split_num[0]) < 0)
{
var minus_nummber = '-';
}
else
var minus_nummber = '';
integer = Math.abs(parseInt(split_num[0]));
var number = new String(integer);
var num = [];
while(number.length > 3)
{
var number1 = number.substr(number.length-3);
num.unshift(number1);
number = number.substr(0,number.length-3);
}
if(number.length > 0) { num.unshift(number); }
number = num.join(',');
if(parseInt(split_num[1]).length < 1)
{
currency = number;
}
else
{
currency = number + '.' + parseInt(split_num[1]); }
final_amount = minus_nummber + currency;
alert(final_amount);
}
var currency="1300.40";
var currency=FormattedCurrency(currency);
</script>
</head>
</html>
Disabling right click/Cut/Copy/Paste into HTML form using Javascript | Disable view Source
Posted by Raj
Disabling right click/Cut/Copy/Paste into HTML form using Javascript | Disable view Source
In this article,I will explain how to Disable cut, copy, paste, right click and context menu using Javascript.Some times we need to disable the right click option in the web browser for security
reason.Disable view source is the Best way to prevent content hijacking.You can Protect images,content by disabling right-click on a web page..with below script you can disable right click in the entire page using Javascript.
In this article,I will explain how to Disable cut, copy, paste, right click and context menu using Javascript.Some times we need to disable the right click option in the web browser for security
reason.Disable view source is the Best way to prevent content hijacking.You can Protect images,content by disabling right-click on a web page..with below script you can disable right click in the entire page using Javascript.
Remove first character of string in jquery/javascript
Posted by Raj
Remove first character of string in jquery/javascript.
In this tutorial, I will explain how to remove first character of a string in javascript.To remove the first character of a string can be easily done by javascript functions
Example:How to delete first character from a string using javascript/jQuery?
<script language="javascript" type="text/javascript">
var string = 'Hello!';
var new_string = string.substring(1);//This will only removes the first character
alert(new_string);
</script>
In this tutorial, I will explain how to remove first character of a string in javascript.To remove the first character of a string can be easily done by javascript functions
Example:How to delete first character from a string using javascript/jQuery?
<script language="javascript" type="text/javascript">
var string = 'Hello!';
var new_string = string.substring(1);//This will only removes the first character
alert(new_string);
</script>
Export to excel in php with jquery/Javascript
Posted by Raj
Export to excel in php with jquery/Javascript
In this article,I will explain how to export excel file in php with JQuery.we are going to export an HTML table to a MS Excel document as it is displayed on the HTML page.it is very easy to export PHP HTML data to excel in PHP.please check following Export to excel example.
Example:Export to excel in php
File:php_export_to_excel.php
<?php
if(isset($_REQUEST['csvdata']))
{
////download to excel
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=csv_excel.xls');
header("Pragma: ");
header("Cache-Control: ");
echo $_REQUEST['csvdata'];
exit();
}
?>
<html>
<head>
<script>
function getCsvData()
{
$("#csvdata").val($("<span>").append ($("#customers").eq(0).clone()).html());
return true;
}
</script>
<title>Export to excel in php with Jquery</title>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<html>
<head>
<style type="text/css">
#customers
{
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
width:50%;
border-collapse:collapse;
}
#customers td, #customers th
{
font-size:1em;
border:1px solid #999999;
padding:3px 7px 2px 7px;
}
#customers th
{
font-size:1.1em;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color: #666666;
color:#ffffff;
}
#customers tr.alt td
{
color:#000000;
background-color: #CCCCCC;
}
</style>
</head>
<body>
<form method="post" onSubmit="javascript:return getCsvData()">
<table align="center" id="customers">
<tr>
<th>Company</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Germany</td>
</tr>
<tr class="alt">
<td>Berglunds snabbköp</td>
<td>Sweden</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Mexico</td>
</tr>
<tr class="alt">
<td>Ernst Handel</td>
<td>Austria</td>
</tr>
<tr>
<td>Island Trading</td>
<td>UK</td>
</tr>
<tr class="alt">
<td> Essen</td>
<td>Germany</td>
</tr>
<tr>
<td>Laughing Bacchus Winecellars</td>
<td>Canada</td>
</tr>
<tr class="alt">
<td>Magazzini</td>
<td>Italy</td>
</tr>
<tr>
<td>North/South</td>
<td>UK</td>
</tr>
<tr class="alt">
<td>ABC</td>
<td>France</td>
</tr>
</table>
<table align="center" id="customers1">
<tr>
<td colspan="6"align="center"><input type="hidden" id="csvdata" name="csvdata">
<input type="submit" value="Export to Excel"> </td>
</tr>
</table>
</form>
</body>
</html>
In this article,I will explain how to export excel file in php with JQuery.we are going to export an HTML table to a MS Excel document as it is displayed on the HTML page.it is very easy to export PHP HTML data to excel in PHP.please check following Export to excel example.
Example:Export to excel in php
File:php_export_to_excel.php
<?php
if(isset($_REQUEST['csvdata']))
{
////download to excel
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=csv_excel.xls');
header("Pragma: ");
header("Cache-Control: ");
echo $_REQUEST['csvdata'];
exit();
}
?>
<html>
<head>
<script>
function getCsvData()
{
$("#csvdata").val($("<span>").append ($("#customers").eq(0).clone()).html());
return true;
}
</script>
<title>Export to excel in php with Jquery</title>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<html>
<head>
<style type="text/css">
#customers
{
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
width:50%;
border-collapse:collapse;
}
#customers td, #customers th
{
font-size:1em;
border:1px solid #999999;
padding:3px 7px 2px 7px;
}
#customers th
{
font-size:1.1em;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color: #666666;
color:#ffffff;
}
#customers tr.alt td
{
color:#000000;
background-color: #CCCCCC;
}
</style>
</head>
<body>
<form method="post" onSubmit="javascript:return getCsvData()">
<table align="center" id="customers">
<tr>
<th>Company</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Germany</td>
</tr>
<tr class="alt">
<td>Berglunds snabbköp</td>
<td>Sweden</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Mexico</td>
</tr>
<tr class="alt">
<td>Ernst Handel</td>
<td>Austria</td>
</tr>
<tr>
<td>Island Trading</td>
<td>UK</td>
</tr>
<tr class="alt">
<td> Essen</td>
<td>Germany</td>
</tr>
<tr>
<td>Laughing Bacchus Winecellars</td>
<td>Canada</td>
</tr>
<tr class="alt">
<td>Magazzini</td>
<td>Italy</td>
</tr>
<tr>
<td>North/South</td>
<td>UK</td>
</tr>
<tr class="alt">
<td>ABC</td>
<td>France</td>
</tr>
</table>
<table align="center" id="customers1">
<tr>
<td colspan="6"align="center"><input type="hidden" id="csvdata" name="csvdata">
<input type="submit" value="Export to Excel"> </td>
</tr>
</table>
</form>
</body>
</html>
Find textbox length in javascript
Posted by Raj
Find textbox length in javascript
In this tutorial,I will explain how to find the length of textbox using javascript.It is very easy to find textbox length in javascript.we can use javascript length property.
Example:Find textbox length in javascript
<html>
<head>
<title>Textbox limit characters</title>
<script>
function findTextboxLength()
{
textbox_val=textbox1.value;//gets the value of the input element entered by the user.
textbox_length = textbox_val.length;//find the length of textbox in javascript
if (textbox_length < 10)
{
char = 10 - textbox_length;
msg = char + " characters left";
text_span.innerHTML="<font color=blue>" + msg + "</font>";
}
else
{
text_span.innerHTML="<font color=red>Message is too long</font>";
}
}
</script>
</head>
<INPUT type="text" id="textbox1" onKeyUp="findTextboxLength();" >
<span id="text_span" name="text_span"></span>
</html>
In this tutorial,I will explain how to find the length of textbox using javascript.It is very easy to find textbox length in javascript.we can use javascript length property.
Example:Find textbox length in javascript
<html>
<head>
<title>Textbox limit characters</title>
<script>
function findTextboxLength()
{
textbox_val=textbox1.value;//gets the value of the input element entered by the user.
textbox_length = textbox_val.length;//find the length of textbox in javascript
if (textbox_length < 10)
{
char = 10 - textbox_length;
msg = char + " characters left";
text_span.innerHTML="<font color=blue>" + msg + "</font>";
}
else
{
text_span.innerHTML="<font color=red>Message is too long</font>";
}
}
</script>
</head>
<INPUT type="text" id="textbox1" onKeyUp="findTextboxLength();" >
<span id="text_span" name="text_span"></span>
</html>
Javascript Find Vowels in a String
Posted by Raj
Javascript Find Vowels in a String
In this article, I will explain how to find Vowels in a String and how to find total number of vowels in a string in JavaScript. I have written simple script for checking vowels in a string in JavaScript. I have used regular expression. For me, a regular expression is best.
Read more "Find Vowels in a String in Javascript"
In this article, I will explain how to find Vowels in a String and how to find total number of vowels in a string in JavaScript. I have written simple script for checking vowels in a string in JavaScript. I have used regular expression. For me, a regular expression is best.
Read more "Find Vowels in a String in Javascript"
JQuery change to uppercase
Posted by Raj
JQuery change to uppercase
Change text to UpperCase using jQuery.In this article,I will explain How to Change text to UpperCase using jQuery.We are using following JavaScript code to Change text to UpperCase
using jQuery.
The keyup() method is used to Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element and The toUpperCase() method converts a string to uppercase letters.
You can use javascript toUpperCase() method to Change text to UpperCase
using jQuery.In the following code we have called the keyup event in the JavaScript to
Change lowercase chars to uppercase. This function would be called when any
user enters char on the textbox .The javascript code below shows how to Change text to UpperCase using jQuery.
Change text to UpperCase using jQuery.In this article,I will explain How to Change text to UpperCase using jQuery.We are using following JavaScript code to Change text to UpperCase
using jQuery.
The keyup() method is used to Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element and The toUpperCase() method converts a string to uppercase letters.
You can use javascript toUpperCase() method to Change text to UpperCase
using jQuery.In the following code we have called the keyup event in the JavaScript to
Change lowercase chars to uppercase. This function would be called when any
user enters char on the textbox .The javascript code below shows how to Change text to UpperCase using jQuery.
My SQL get string length
Posted by Raj
My SQL get string length
Get the length of string in my sql server.In this article,I will explain how to get the length of string in My SQL server.
My SQL string LENGTH function Returns the length of the character string.
Syntax: LENGTH(string)
Query to get string Length in My SQL
select LENGTH('str') as str_length;
I hope above query will help you to get the length of the character string in My SQL server.
Get the length of string in my sql server.In this article,I will explain how to get the length of string in My SQL server.
My SQL string LENGTH function Returns the length of the character string.
Syntax: LENGTH(string)
Query to get string Length in My SQL
select LENGTH('str') as str_length;
I hope above query will help you to get the length of the character string in My SQL server.
MS SQL get string length
Posted by Raj
MS SQL get string length
Get the length of string in ms sql server.In this article,I will explain how to get the length of string in MS SQL server.
MS SQL string LEN function Returns the length of the character string.
Syntax: LEN(string)
Query to get string Length in MS SQL
select LEN('str') as str_length;
I hope above query will help you to get the length of the character string in MS SQL server.
Get the length of string in ms sql server.In this article,I will explain how to get the length of string in MS SQL server.
MS SQL string LEN function Returns the length of the character string.
Syntax: LEN(string)
Query to get string Length in MS SQL
select LEN('str') as str_length;
I hope above query will help you to get the length of the character string in MS SQL server.
Jquery spell checker (Textarea spellcheck jquery)
Posted by Raj
Jquery spell checker
In this article, I will explain about jquery spell checker.We are using following jquery code to check spell in Jquery.This plugin is used to check an area of text within an HTML document.The
plugin comes with an example PHP script that supports two type of spell checking engines:
In this article, I will explain about jquery spell checker.We are using following jquery code to check spell in Jquery.This plugin is used to check an area of text within an HTML document.The
plugin comes with an example PHP script that supports two type of spell checking engines: