Jump to content

smus

Members
  • Posts

    177
  • Joined

  • Last visited

Everything posted by smus

  1. When I read from my MS Access database(unicode), the Cyrillic characters are not being written correctly in browser(utf-8). How to encode the data by VBScript in real time or how to convert it manually in MS Access? This is what I've found on this topic, but it seems to be quite complicated: http://stackoverflow.com/questions/22054934/capture-and-insert-unicode-text-cyrillic-into-ms-access-database/22072399#22072399
  2. smus

    <div> visibility

    Yes, it works, thanks! Just transferred the same button out of the form.
  3. Let's pretend, there's a <div> on a page. There's a usual HTML form inside it that sends information to another php-file. By default, the visibility of the div is hidden, and the click on the button makes it visible. The question is how to close the form (i.e. hide the div) using a button or <a> element on the div, WITHOUT the sending data to php-file. In other words, how to close this <div> as if it is usual popup-window, without changes?
  4. Could not connect to mdb-file using classic ASP under 64bit windows, but before it under 32bit windows(IIS 8), connection worked well. Did anyone face the same trouble? Could you please explain it?
  5. Thank you very much! Just one more question: is it possible to create the same features in W3.css by adding appropriate css code? Or it is also supports only horizontal positioning?
  6. I've got an IIS (Win8-64), noip-service (via DUC program), and domain name. What IP-address should I point at "bindings" section on IIS to bind the domain to my server? I know it's not very difficult, but could anyone please explain the process in details?
  7. I need the tabs to be on the left(horizontally). Tried to use the class "tabbable tabs-left" (class="tabbable tabs-left") but it doesn't work. They continue to be on the bottom (by default), as in the official example(http://getbootstrap.com/2.3.2/components.html#navbar): <div class="tabbable tabs-left"> <ul class="nav nav-tabs"> <li class="active"><a href="#tab1" data-toggle="tab">Section 1</a></li> <li><a href="#tab2" data-toggle="tab">Section 2</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="tab1"> <p>I'm in Section 1.</p> </div> <div class="tab-pane" id="tab2"> <p>Howdy, I'm in Section 2.</p> </div> </div> </div> Maybe anyone know what is wrong?
  8. Pretty difficult task. Don't have enough practice. Could you please explain the details?
  9. When the user checkes another checkbox. The list of checkboxes that I'm trying to check can have several values (1 or more). Each value corresponds to a so called general checkbox of another group that user checkes so that not to check each checkbox from the large list. In other words, each CB of the general list unites the group of checkboxes of another list by the identical values. I've created a function that successfully checkes the CB(using JQuery $.post method), however it is not able to do two things: uncheck the corresponding checkboxes if user uncheckes the checkbox(retroaction) and does not consider that each of CB may have several values.
  10. I've got a form with checkboxes each of one has been generating from mysql-table data. I need to check the certain checkbox by checking another one according to the data values from the mysql-data. I've started to write a code that collects the data into an array. Could someone explain how to catch it in a JS function that will check the appropriate checkboxes?
  11. Thank you very much! It works! I've done it by adding values to an array an then by using 'implode' function with 'UNION' SQL-connector and by placing the queries to a string!
  12. Success! I've sent the values, but in a slightly different way. IMHO, it looks a little bit stupid, but I've created new vars and give them the values of the array so that they would succesfully be transferred to search.php! Now I need to form an appropriate SQL-query, not knowing in advance, how many parameters my search demands. This is actually a reason why I mentioned an array creation. I don't understand exactly how to check the values of the received variables. I've got several of them each of which has 0(zero) value if checkbox is not checked and 1 value if it is checked. So this is what in my proccessing file: $ls=$_POST['ls']; // what to find $cb1=$_POST['cb1']; // checkbox values (either 0 or 1) $cb2=$_POST['cb2']; $cb3=$_POST['cb3']; $cb4=$_POST['cb4']; $cb5=$_POST['cb5']; $cb6=$_POST['cb6']; $sql=mysql_query("SELECT * FROM tablename WHERE fieldname LIKE '" .$ls. "%' ") // sql-query Now I need to dynamically change the field names and their number.
  13. Anyway thanks for your help! Well, I've given the checkboxes usual names but also I've created an array a with 6 values (the amount of checkboxes): var a = [ 0,1,2,3,4,5 ] that gets to know whether a checkbox is checked or not. Now I need to send it to search.php, the file that process the data. Should I place it in here as a second parameter of the function? $.post("search.php", {ls:str, a[]}, function(data) And do I have to catch it in search.php this way(as usual)? $a[]=$_POST['a'];
  14. Thanks! I got the idea. But the problem I'm new in JS and JQ, could you please provide a example code? And to the checkboxes: should I name them p1,p2,p3 instead of an array name? Is that right?
  15. I've given the checkboxes array names. Is that right? Or it's not necessary for jQuery? Could you please tell me where I have to change the code?
  16. form.php <script> function showHint(str) { if (str != "") { $.post("search.php", {ls:str}, function(data) { $("#results").empty().append(data); }); } else { $("#results").empty(); } } </script> <form onsubmit="showHint(document.getElementById('txt').value);return false" method="post" action="test.php"> <table align="center"> <tr> <td align="center"> <input type="search" id="txt" name="ls" onkeyup="showHint(this.value)" onkeydown="showHint(this.value)" autofocus autocomplete="off"> </td> </tr> <tr> <td> <input type="checkbox" name="p[]" checked>p1 <input type="checkbox" name="p[]">p2 <input type="checkbox" name="p[]">p3 </td> </tr> </table> </form> <span id="txtHint"></span> <div id="results"></div> search.php include("dbconfig.php"); $ls=$_POST['ls']; $sql=mysql_query("SELECT * FROM companies WHERE name LIKE '" .$ls. "%' ") or die(mysql_error()); $i=0; $rowsnumber=mysql_num_rows($sql); while($row=mysql_fetch_array($sql)) { echo $row['name']; }
  17. I've got an Instant Search (livesearch) on PHP+JQuery that receives the data from MySQL table by one parameter. I need to create an advanced version of it: with complementary checkboxes inside the html-form. Could anyone at least briefly explain the algorithm of the script? Should I put checkbox values into an array? What should I change on javascript code?
  18. I've had the same. As an alternative, try to use javascript(it works in my code): <script language="JavaScript"> window.location.href = "yourfile.php"</script>
  19. smus

    Livesearch

    I also added: <div id="results"></div>
  20. smus

    Livesearch

    No, it doesn't work: I've tried to call the variable through id and name.
  21. smus

    Livesearch

    In general, the script is not showing the results from database after I'm typing the values. 2nd point: yes, should I use the name of the 'id' field? this way? $s=($_POST['txt']);
  22. smus

    Livesearch

    It should get the data from MySQL base and show the results when user types the request ('onkeyup' action)
×
×
  • Create New...