-
Filter
Sir I am using these codes <?php $myfilter=""; ?> <!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>My Contacts</title> <style type="text/css"> html { overflow:auto; } body{ background-color:#e7f4fe; padding:15px; } #box2{ float:left; width:500px; height:400px; border-color:#cceeff; padding:10px; background-color:#CCF; overflow:auto; } #box2 #resultTable{ border-bottom: 7px solid #9BAFF1; border-collapse: collapse; border-top: 7px solid #9BAFF1; font-family: "Lucida Sans Unicode","Lucida Grande",Sans-Serif; font-size: 12px; margin: 10px; text-align: center; width: 480px; } #box2 #resultTable th{ background: none repeat scroll 0 0 #B9C9FE; border-left: 1px solid #9BAFF1; border-right: 1px solid #9BAFF1; color: #003399; font-size: 13px; font-weight: normal; padding: 4px; } #box2 #resultTable td { background: none repeat scroll 0 0 #E8EDFF; border-left: 1px solid #AABCFE; border-top: 1px solid #9BAFF1; border-right: 1px solid #AABCFE; color: #666699; padding: 4px; } #amots{ padding:5px; border-radius:5px; width:250px; border:1px solid gray; background: url("images/sport_raquet.png") no-repeat scroll right 10px ; } </style> </head> <body onload="form1.filter.focus()"> <div id="box2"> <form name="form1" action="" method="post"> <label for="filter"><b>Filter</b></label> <input type="text" name="filter" id="amots" value="<?php echo $myfilter; ?>" /> <input type="submit" value="Filter Result" name="display"> <table cellpadding="2" cellspacing="0" width="80%" id="resultTable"> <thead> <tr> <th> <strong>ID</strong> </th> <th> <strong>Name</strong> </th> <th> <strong>Mobile</strong> </th> <th> <strong>City</strong> </th> <th> <strong>Country</strong> </th> </tr> </thead> <tbody> <?php session_start(); require_once("connect.php"); function clean($str){ $cstr=trim($str); $cstr=addslashes($str); $cstr=htmlspecialchars($str); return $cstr; } if(isset($_POST['display'])) { $myfilter=clean($_POST['filter']); } else { $myfilter=""; } $sql = "SELECT * from contacts WHERE name LIKE ".$myfilter."% order by name"; echo $sql; $select = mysqli_query($con, $sql); $run_sel = mysqli_fetch_array($select); $row=mysqli_num_rows($select); $a = 1; while($a<=$row) { echo "<tr>"; echo "<td> <a href='contacts.php?id=".$run_sel['id']."'> <img border=\"noborder\" src=\"images/pencil.png\" title=\"Display\"></a></td>"; echo "<td align='left'> " . $run_sel["name"]. "</td>"; echo "<td> " . $run_sel["moba"]. "</td>"; echo "<td> " . $run_sel["city"]. "</td>"; echo "<td> " . $run_sel["country"] . "</td>"; echo "</tr>"; $run_sel = mysqli_fetch_array($select); $a++; } ?> </tbody> </table> </form> </div> </body> </html> These codes display following data http://i43.tinypic.com/or45r8.jpg Now I want to apply incremental search with Filter box. For example: If I type "B" then all matching records (name field in table) which begins with "B" must appear in display list. Please help
-
Current date time
Hello Again there are two problems in your codes 1- Wrong date 2- Leading zero My computer date is 07/03/2012 But your codes says Wednesday March 3,2012 009:46:00 AM Please review
-
Current date time
Hello Again Thanks for helping The date part is same which I need but time is show as 16:13:28 PM But I need 12Hours format as 04:13:28 PM Please help again
-
Current date time
Hello Experts I have following codes <html> <head> <script language="Javascript"> function showdate() { var currentTime = new Date() var month = currentTime.getMonth() +1 var day = currentTime.getDate() var year = currentTime.getFullYear() var hours = currentTime.getHours() var minutes = currentTime.getMinutes() var seconds = currentTime.getSeconds() alert(month + "/" + day + "/" + year +"\n" + hours+ ":"+ minutes+ ":"+ seconds) } </script> </head> <body onload="showdate()"> </body> </html> the output is as 03/06/2012 14:41:46 But I want to get following result Tuesday March 06, 2012 02:41:46 PM Please modify my codes or suggest some others. Thanks in advance
-
Two level menu
Dear Experts I refer to this link http://css.dzone.com/news/css-and-html-two-level-menus-t with the help of above link, I am trying to create CSS And HTML Two Level Menus. For this I copy following codes but it has some error. Please help me to correct my codes. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>HTML and CSS Drop Down Menu</title> <style type="text/css"> #nav li.second-level { position:relative; } #nav li ul { display:none; } #nav li:hover ul, #nav li:focus ul { position:absolute; display:block; } #nav li ul li { float:none; border-top:1px solid #fff; } #nav li:hover ul, #nav li:focus ul { position:absolute; top:0; margin-left:100%; display:block; } #nav li.second-level li { border-left:5px solid #376D00; } </style> </head> <body> <ul id="nav"> <li><a href="index.html" title="return to front page">Home</a></li> <li class="second-level"><a href="about.html" title="learn more about us">About</a> <ul> <li>Corporate Profile</li> <li>Employee Profiles</li> <li>Divisions</li> </ul> </li> <li><a href="portfolio.html" title="see some samples of our work">Portfolio</a></li> <li><a href="contact.html" title="contact us">Contact</a></li> </ul> </body> </html>
-
iFrame Problem
Dear Sir, Please see attachemt and help me to solveout iframe problem. Problem detail is in attachment. Thanks Iframe.zip
-
Datepicker Problem
Dear Experts I am creating datapicker with the help of following link http://edwin.baculsoft.com/test/calendar.html datepicker on above link works fine but when I apply code to my page then it does not work. The attachment is my html and other files. Please help me to locate error. Thanks in advance datepicker.zip
-
Jquery rounded corners
Dear Experts, I have following codes <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <META content="text/html; charset=windows-1252" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.7600.16912"> <style type="text/css"> .back {clear:both;width:100px;height:30px;padding:5px;color:green;font-style:bold;} h3 {color:blue;font-style:bold;BACKGROUND: url(hotmail2.jpg) no-repeat center #90bade;line-height:30px;} #box {width:275px;height:275px;padding:5px;margin:5px;background:#e3eeff;text-align:center;border:1px solid #069;} </style> <script type="text/javascript" src="jquery-1.7.1.js"></script> <script type="text/javascript" src="jquery.corner.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('input[name="RD"]').click(function(){ alert("Please note \n Image corners will be rounded now") $("imgBox").corner("35px"); }); }); </script> </head> <body> <center> <h1>JQuery Tutorials</h1> <div id="box"> <H3>Rounded Corners</H3> <div id="imgBox"><img src="bg8.jpg" alt="" width=200 height=200></div><br> <input type="submit" class="back" name="RD" value="Apply"> </div> </center> </body> </html> I want to apply rounded corners to image. For this when I press Apply button, then it does not work. Please help me to locate where is what is wrong with my codes. The attachment contains HTML file and Libraries. Thanks Round.zip
- Selectors
-
Menu Problem
Dear Experts I have following web www.tariq.3hmb.com When I press any menu link then the first letter of mene name become lowercase i.e when I press Home then it become home. Please help me to sortout problem. For menu, I have following codes in css file #button { float:left; margin-top:1px; width: 145px; border-right: 1px solid #508fc4; padding: 5px; margin-bottom: 5px; font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Lucida, Geneva, Helvetica, Arial, sans-serif; background-color: #90bade; color: #333; } #button img{border:none; background: none;} #button img { background: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (src="/path/to/logo.png", sizingMethod="scale"); } #button ul { list-style: none; margin: 0; padding: 0; border: none; } #button ul li { border-bottom: 1px solid #90bade; margin: 0; width: 130px; text-decoration: none; } #button ul li a:link { display: block; padding: 5px 5px 5px 1px; border-left: 10px solid #1958b7; border-right: 1px solid #508fc4; background-color: #2175bc; color: #fff; text-decoration: none; width: 130px; text-indent: 2px; } #button ul li a:visited { display: block; padding: 5px 5px 5px 1px; border-left: 10px solid #1958b7; border-right: 1px solid #508fc4; background-color: #2175bc; color: #fff; text-decoration: none; width: 130px; text-indent: 2px; } #button ul li a:hover { background-color: #CCFF99; color:red ; width: 130px; font-weight:bold; } Thanks
- Get Total
-
Numeric textbox with format
Yes sir I want comma and decimal point as 99,999,999.99 Please help
-
Numeric textbox with format
Dear Experts I have following codes <DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="language" content="english"> <meta http-equiv="Content-Style-Type" content="text/css"> <title>Numeric Textbox Sample</title> <style type="text/css"> #box1 {width:200px;height:170px;border:1px solid green;background:#e3eeff;padding-top:20px;} .button {width:100px;margin-top:0px;} body { margin:0; margin-top:100px; } </style> <script language="javascript"> function NumericDotOnly() { var key = window.event.keyCode; if (((key >47) && (key <58)) || (key==46)) window.event.returnValue = true; else window.event.returnValue = false; } function formatCurrency(num) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); cents = num%100; num = Math.floor(num/100).toString(); if(cents<10) cents = "0" + cents; for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + num + '.' + cents); } </script> </head> <body onload="form2.text1.focus()" > <center> <p>I need following format<br> 99,999,999.99<br> </p> <div id="box1"> <form name=form2> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td>Amount</td> <td><input type=text name=text1 size=15 value="" onkeypress="form2.text3.value=NumericDotOnly ()";onblur="form2.text3.value=formatCurrency(form2.text1.value)"> </td></tr> <tr><td>Tax</td> <td><input type=text name=text2 size=15 value="" onkeypress="form2.text3.value=NumericDotOnly()";onblur="form2.text3.value=formatCurrency(this.value)"></td></tr> <tr><td>Result</td><td><input type=text name=text3 size=15 value="" disabled></td></tr> </table> <hr> <input class="button" type=button name=command1 value="Plus" onclick="form2.text3.value=parseFloat(form2.text1.value)+parseFloat(form2.text2.value)"><br> <input class="button" type=button name=command8 value="Focus" onclick="form2.text1.select()";"form2.text1.focus()"><br> <input class="button" type=reset name=command9 value="Reset"> </form> </div> </center> </body> </html> I want textboxes to accept data in this format 99,999,999.99 Please help
-
Alert
Dear Experts In following codes alert() does not work, please check what is wrong? <script language="javascript"> function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) { return false; } else { return true; alert("Only Numeric") } } </script>
-
Sum
Dear Experts I have following codes <html> <head> <title>this is first math exercise within Java Script</title> <script lanuage="Javascript"> function total() { Var amount1 = text1.value Var amount2 = text2.value Var total=eval(amount1) + eval(amount2) text3.value=total alter("Correct Answer") } </script> </head> <body> <center> <form> <table width="20%" border="1" cellpadding="1" cellspacing="1" > <tr> <td width="10%" align="center">Amount1</td> <td width="10%"><input type="number" name="text1" value="" min="1001" max="8000"></td> </tr> <tr> <td width="10%" align="center">Amount2</td> <td width="10%"><input type="number" name="text2" value="" min="1001" max="8000"></td> </tr> <tr> <td width="10%" align="center">Total</td> <td width="10%"><input type="number" name="text3" value="" min="1001" max="8000""></td> </tr> <tr> <td width="10%"></td> <td width="10%"><INPUT TYPE="button" NAME="Submit" VALUE="Compute" onclick="total()"> <input type=reset Value="Clear" size="30"></td> </tr> </table> </form> </center> </body> </html> I want to get summed value in text3 but function does not excecute. What is wrong in my codes? Please help