fill div with php script [SOLVED]

javascript , php Czech Republic
  • 12 years ago

    Hi,
    I need to create HTML table where after clicking some row, more details will be shown in row expansion. Told more easily: after you click a button, some <div> will be fed by javascript with data recieved from some php script. How to do this feed?

    I would imagine it as this:
    <button onclick="fill(1)">
    <div id=d1></div>
    <script>
     function fill(id)
     {
      d1.innerHtml=getdata("readDB.php?id="+id);
     }
    </script>

    Thx.Confused

  • 12 years ago

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The greatest performance improvement of all is when a system goes from not-working to working.” - John Ousterhout