[RESOLVED] Setting Explorer's Title
I am doing an ASP.NET project and making use of a frameset page to dispay my menus and the pages.
Problem is the title of the IE does not change as the menu calls up different pages. The title is as set by the frameset.
Please how can i programmatically change the title of the IE at will.
Re: Setting Explorer's Title
Hi,
youcant. the title of IE is set when there is evidence of a title present when teh page loads or re-loads.
what youll have to do is use querystrings to imitate a page change and invoke a reload/refresh, then dynamically change the title using script. such an example is this.
VB Code:
<title><% call titlewrite() %></title> 'write the title on the fly...
<a href="?id=buton1"> ' anchor ref for each buttton, so when pressed
' it adds thjis ID to the existing page, adn the script changes the frame.
</a>
function titlewrite()
myArray = Array ("hello world", "hello world again", "and another hello world")
if Request.querystring("ID") = "button1" then
with response
.write myArray(0)
end with
' or you could do it this way
Select Case Cstr(Request.Querystring("ID"))
CAse "button1"
with response
.write myArray(0)
end with
' and so on
end select
if IsNull(Request.Querystring("ID")) then
with response
.write "Site home"
end with
end if
end function
Get the idea??
Hope this helps
Kai hirst
Re: Setting Explorer's Title
You can try using javascript's document.title property, but I don't think it'll work in a frameset. The only way it'd work is if you reloaded the page with the new title, or better, use web user controls in a single page instead of frames.