HOW CAN I CHANGE DOCUMENT TITLE TO RECORD FROM DB WITH JAVASCRIPT?

F Scott Fitzgerald

Total Post:28

Points:196
Posted by  F Scott Fitzgerald
 1524  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. C G E Mannerheim

    Post:28

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

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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!