P
P
Petr Volkhanov2014-11-05 21:36:59
JavaScript
Petr Volkhanov, 2014-11-05 21:36:59

x-webkit-speech not working. What is the problem?

I will describe the problem on the page there is a search form to which the following jquery code is applied:

$("#mod-search-searchword").attr({maxlength : "100", size : "100", role : "search", type: "search", results: "10", autosave: "google"}).attr("x-webkit-speech","x-webkit-speech");


It turns out this HTML:

<input name="searchword" id="mod-search-searchword" maxlength="100" class="inputbox search-query" type="search" size="100" value="Введите фразу для поиска..." onblur="if (this.value=='') this.value='Введите фразу для поиска...';" onfocus="if (this.value=='Введите фразу для поиска...') this.value='';" role="search" results="10" x-webkit-speech="x-webkit-speech">


But x-webkit-speech doesn't work, I can't use my voice to enter text into a form field (I'm using Google Chrome). What is the problem? Help me please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Tsymbal, 2014-11-05
@AlexanderTsymbal

x-webkit-speech is no longer working. the solution can be here - if you know English
stackoverflow.com/questions/23188951/x-webkit-spee...

A
anton_lazarev, 2017-01-27
@mrzgt

Your solution is working, but there is a logical error in the condition. In your case, $counter will be equal to 4 only 1 time, but you need to check the division of $counter by 4 without a remainder, and if the condition is true, then display the div:

<?php if ($counter % 4 == 0) { ?>
  <div class="clearfix"></div>
  <?php } ?>
  <?php } ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question