I've been looking all over the internet for help on this. Basically, I'm just trying to get the title of the webpage to change as someone clicks a link that loads the content into a div using Dynamic Ajax.
Printable View
I've been looking all over the internet for help on this. Basically, I'm just trying to get the title of the webpage to change as someone clicks a link that loads the content into a div using Dynamic Ajax.
that should work.Code:<title>title one</title>
<script type="text/javascript">
function change_title() {
document.title = 'new title!';
}
</script>
<a href="#" onclick="change_title();">change title!</a>
I want to use multiple titles, like 8, how would I do that? Or would that script work for something like that?
you could do something like
and then every time you want to change your title doCode:function change_title(title) {
document.title = title;
}
etc.Code:<a href="#" onclick="change_title('what you want the title to be');">change!</a>
<a href="#" onclick="change_title('different title');">change!</a>
<a href="#" onclick="change_title('third title');">change!</a>
:thumbup:
Scratch that. Testing now.
---------- Post added at 08:56 PM ---------- Previous post was at 08:51 PM ----------
Worked perfectly, I'll be turning to your for more help, thanks dude! :'D