Home > DeveloperSection > Forums > How can I change document title to record from db with javascript?
F Scott Fitzgerald
F Scott Fitzgerald

Total Post:29

Points:203
Posted on    October-05-2013 9:13 AM

 JavaScript JavaScript 
Ratings:


 1 Reply(s)
 997  View(s)
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.



C G E Mannerheim
C G E Mannerheim

Total Post:29

Points:203
Posted on    October-05-2013 9:31 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick