How can I change document title to record from db with javascript?

Total Post:28

Points:196
 1618  View(s)
Ratings:
Rate this:

I want to change the document title but cant get it to work. I am working with the following code:

echo "<input type='textbox' id='print' value='".$row['formuliernummer']."'>";

<script type="text/javascript">
var print = document.getElementById("print");
document.title = print;
</script>


The formuliernummer comes from a db.

  1. Post:28

    Points:196
    Re: How can I change document title to record from db with javascript?

    var print = document.getElementById("print").value;

Answer