Recent Posts

PHP While loo

Monday 5 December 2016

       


$result = mysqli_query($con, $query);

while($row = mysqli_fetch_array($result))
{  
 echo "<span> Employee Name :". $row['eFullName']. "<span><br>";
 echo "<span> Employee ID :". $row['eID']. "<span><br>";
 echo "<span> Employee Mobile  :". $row['eMobile']. "<span><br>";
 echo "<span> Employee Address :". $row['eAddress']. "<span><br>";
}

?>
</div>

</body>

</html>

Dynamically Load More Table Rows Example by JQuery -Simple & Useful Developer tool

Friday 29 May 2015


Load more table rows by JQuery : Below is the jQuery based load more table example > Many time we need this functionality to be developed in our website application and its a time taking job, if its not already developed in your application, So I have created this example to save your time , you have to just copy and paste this code to your application.
The two things you have consider before using this code to your application . Use any jQuery framework,it could be 1.8.1 or 1.1.1, t This code will work smoothly on any jQuery framework without any issue. Now the second part is you need to change table id instead of existing one. whichever applicable to your application or you have use the same one.
Now the configuration part , you just have to change one line i.e. row2disaply, default I have added 4 rows to display ,you can change it as per your requirement.
If you think this code will importer much better , please leave your comment or contact me. Thanks

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script> $(function() { var totalrowshidden; var rows2display=4; var rem=0; var rowCount=0; var forCntr; var forCntr1; var MaxCntr=0; $('#hide').click(function() { var rowCount = $('#jsWebKitTable tr').length; rowCount=rowCount/2; rowCount=Math.round(rowCount) for (var i = 0; i < rowCount; i++) { $('tr:nth-child('+ i +')').hide(300); } }); $('#show').click(function() { rowCount = $('#jsWebKitTable tr').length; MaxCntr=forStarter+rows2display; if (forStarter<=$('#jsWebKitTable tr').length) { for (var i = forStarter; i < MaxCntr; i++) { $('tr:nth-child('+ i +')').show(200); } forStarter=forStarter+rows2display } else { $('#show').hide(); } }); $(document).ready(function() { var rowCount = $('#jsWebKitTable tr').length; for (var i = $('#jsWebKitTable tr').length; i > rows2display; i--) { rem=rem+1 $('tr:nth-child('+ i +')').hide(200); } forCntr=$('#jsWebKitTable tr').length-rem; forStarter=forCntr+1 }); }); </script> <table id="jsWebKitTable" style="width:100%"> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>1</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>2</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>3</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>4</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>5</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>6</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>7</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>8</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>9</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>10</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>11</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>12</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>13</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>14</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>15</td> </tr> <tr> <td>JavaScriptWebKit_td1</td> <td>JavaScriptWebKit_td2</td> <td>16</td> </tr> </table> <input id="show" type="button" value="Load More Table Rows..... "/> 

Try this- Load More Table Rows Example by JQuery



JavaScriptWebKit_td1 JavaScriptWebKit_td2 1
JavaScriptWebKit_td1 JavaScriptWebKit_td2 2
JavaScriptWebKit_td1 JavaScriptWebKit_td2 3
JavaScriptWebKit_td1 JavaScriptWebKit_td2 4
JavaScriptWebKit_td1 JavaScriptWebKit_td2 5
JavaScriptWebKit_td1 JavaScriptWebKit_td2 6
JavaScriptWebKit_td1 JavaScriptWebKit_td2 7
JavaScriptWebKit_td1 JavaScriptWebKit_td2 8
JavaScriptWebKit_td1 JavaScriptWebKit_td2 9
JavaScriptWebKit_td1 JavaScriptWebKit_td2 10
JavaScriptWebKit_td1 JavaScriptWebKit_td2 11
JavaScriptWebKit_td1 JavaScriptWebKit_td2 12
JavaScriptWebKit_td1 JavaScriptWebKit_td2 13
JavaScriptWebKit_td1 JavaScriptWebKit_td2 14
JavaScriptWebKit_td1 JavaScriptWebKit_td2 15
JavaScriptWebKit_td1 JavaScriptWebKit_td2 16



Javascript deselect listbox item

Saturday 23 May 2015

Deselect listbox item in javascript: Deselect or unselct item in JavaScript by simply assigning false property to selected option , look at the example –

Deselect listbox item using javascript

<script> function DeselectListBox() { var ListBoxObject=document.getElementById("fruits") for (var i = 0;i < ListBoxObject.length; i++) { if (ListBoxObject.options[i].selected ) { ListBoxObject.options[i].selected = false } } } </script> <select name="fruits" id="fruits" multiple> <option value="Apple">Apple</option> <option value="Apricot">Apricot</option> <option value="Asparagus">Asparagus</option> <option value="Fig">Fig</option> <option value="Avocado">Avocado</option> <option value="Banana">Banana</option> <option value="Clementine">Clementine</option> <option value="Honeydew melon">Honeydew melon</option> </select> <button onclick="javascript:DeselectListBox();">Deselect List Box</button>


Try this-Deselect listbox item using JavaScript...






JavaScript listbox validation


Validate JavaScript listbox selected value: To get & validate JavaScript listbox selectedindex value, we have added listbox selectedindex example below. Here you have to use options[x].selected property to find each element from list as to be selected or not using for loop. Run the for loop on each elements and search each element position from list, if its selected it will return true if not will return false, remember JavaScript returns true automatically , if you have not considered then let it be , it won’t produces any error . Anyway, please look at the example below –

Validate listbox in JavaScript Example:

<script> function validateListBox() { var ListBoxObject=document.getElementById("fruits") var tot=0;
for (var i = 0;i < ListBoxObject.length; i++) { if (ListBoxObject.options[i].selected == false) {tot=tot+1;} }
if (ListBoxObject.length==tot)   
   {alert('Please select fruits from a list')
    return false;
  
}
 } function DeselectListBox() { var ListBoxObject=document.getElementById("fruits") for (var i = 0;i < ListBoxObject.length; i++) { if (ListBoxObject.options[i].selected ) { ListBoxObject.options[i].selected = false //deselect all JavaScript values assign false property to list values } } } </script> <select name="fruits" id="fruits" multiple> <option value="Apple">Apple</option> <option value="Apricot">Apricot</option> <option value="Asparagus">Asparagus</option> <option value="Fig">Fig</option> <option value="Avocado">Avocado</option> <option value="Banana">Banana</option> <option value="Clementine">Clementine</option> <option value="Honeydew melon">Honeydew melon</option> </select> <button onclick="javascript:validateListBox();">Validate List Box</button> <button onclick="javascript:DeselectListBox();">Deselect List Box</button>

Implementation : Try it...

JavaScript get Combobox selected value

Friday 22 May 2015


Get Combobox value Using JavaScript: Combo box or dropdown value can be accessed by following two methods, one you can access it using its index counter and second you can access it using selected index text.


JavaScript get Combobox selected Index text:

<select name="fruits" id="fruits"> <option value="Apple">Apple</option> <option value="Apricot">Apricot</option> <option value="Asparagus">Asparagus</option> <option value="Fig">Fig</option> <option value="Avocado">Avocado</option> <option value="Banana">Banana</option> <option value="Clementine">Clementine</option> <option value="Honeydew melon">Honeydew melon</option> </select> <button onclick="javascript:GetComboBoxValue();">Validate</button> <script> function GetComboBoxValue(){ var CmbObject=document.getElementById("fruits") var fruitName=CmbObject.options[CmbObject.selectedIndex].value;
// get valus using selectedIndex
alert('Your selcted fruit is - '+ fruitName ); } </script>

Try this...







JavaScript ComboBox Validation

Combo box Validation Using JavaScript: Combo box validation or dropdown validation can be achieved by following two methods, one you can access it using its index counter and second you can access it using selected index text.
In selected index counter the counter number will be accessible using its position, if you want to validate using first counter from the list then you have to write '0' i.e. Zero, position counter stars from zero, if you want to validate second value from list add counter 2 instead of zero, by this way you can validate any position for combo box.
Similar way you can access it using its selected index text values, you can apply same logic as we have applied for counter position, here, instead of counter you have to use selected index. Look at examples given below.

Dropdown Validation JavaScript Example:

<select name="fruits" id="fruits"> <option value='-Select-'>-Select-</option> <option value="Apple">Apple</option> <option value="Apricot">Apricot</option> <option value="Asparagus">Asparagus</option> <option value="Fig">Fig</option> <option value="Avocado">Avocado</option> <option value="Banana">Banana</option> <option value="Clementine">Clementine</option> <option value="Honeydew melon">Honeydew melon</option> </select> <button onclick="javascript:validateComboBox();">Validate</button> <script> function validateComboBox(){ var CmbObject=document.getElementById("fruits") if (CmbObject.selectedIndex == 0) { alert("Which fruit do you like? Please select it"); } else { var fruitName=CmbObject.options[CmbObject.selectedIndex].value; alert('Do you like '+ fruitName +'? Good choice' ); } } </script>

Try this... Validate Combobox










HTML to XML Parser for AdSense blogger account

Wednesday 20 May 2015

The Perfect Solution for your AdSense account to convert HTML to XML
Paste your code in below area and click to Parse button to get your parsed code

Input:



Output:

blogger Account - Copy your parsed code and paste it on blogger AdSense portion. This is a simple way to convert you HTML code to XML for Google blogger Ad Sense account.
This online HTML to XML parser tool developed by JavaScript tool developer team, if you face any issue please do contact at admin@xpagedomino.com


 

Blogger JavaScript

Contact Us

Name

Email *

Message *

Tutorials