Forum Moderators: open
mysite.com/brand.html?product=3
Currently the javascript function calls the values for product 3 from a js file and outputs them in the body of the page.
My goal is to give each page a <title> based on this function. I want to display product 3's name as the title of the page. Can I call the function and then output the value in the title tag using javascript?
var Item_Title = "Default Title For Page";
Include this in your product # js file:
Item_Title = "product #'s name";
After the call to the include js file, include in page:
<script TYPE="text/javascript">
document.write("<title>"+Item_Title+"</title>");
</script>
GGG