Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 2
    I don't think what you are trying to do is possible. You cannot calculate a value in JavaScript and paste it inside a PHP statement. PHP is server side while JavaScript is client side. You will need to use the ajax to get the value from JavaScript to PHP. Commented Mar 5, 2013 at 14:01
  • mpossible to read your script untila after I formatted it. Also your line document.getElementById("i1").value = allCells.length; will never be executed Commented Mar 5, 2013 at 14:05
  • You need to use ajax for this purpose! Commented Mar 5, 2013 at 14:06
  • I read the question again, and maybe you don't need PHP. can you put in more detail what you like to do? In my words you calculate a value of something in a table and you like to display that inside of the H3 Commented Mar 5, 2013 at 14:07
  • When I search in my search box, i want to get the number of rows (1 match is 1 row, 2 matches is 2 rows and so on...) Commented Mar 5, 2013 at 14:14