I have a title on my page. It is inside a div tag. When the page is displayed it is simple and says "Net Control Manager". After the user makes a selection a PHP program runs MySQL and returns a table. It also returns a value that I want to put into the title. So that it would say "Net Control Manager: PCARG" for example.
The problem is I'm not sure how to put that extra piece into the div. I write the value to another div with an echo from the php "echo $value" which is returned correctly. Then in an onload in the body tag I use a function to retrieve the new div (newport), and add it to the title div. But since the onload happens first all I get is "undefined".
How do I make it wait for the new div to be written with the new data? Or is there another method I don't know about.