Results 1 to 3 of 3

Thread: [RESOLVED] Setting Explorer's Title

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2005
    Posts
    9

    Resolved [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.

  2. #2
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    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:
    1. <title><% call titlewrite() %></title> 'write the title on the fly...
    2.  
    3. <a href="?id=buton1"> ' anchor ref for each buttton, so when pressed
    4. ' it adds thjis ID to the existing page, adn the script changes the frame.
    5. </a>
    6.  
    7. function titlewrite()
    8.  
    9. myArray = Array ("hello world", "hello world again", "and another hello world")
    10.  
    11. if Request.querystring("ID") = "button1" then
    12. with response
    13. .write myArray(0)
    14. end with
    15.  
    16. ' or you could do it this way
    17.  
    18. Select Case Cstr(Request.Querystring("ID"))
    19.  
    20. CAse "button1"
    21. with response
    22. .write myArray(0)
    23. end with
    24.  
    25. ' and so on
    26.  
    27. end select
    28.  
    29. if IsNull(Request.Querystring("ID")) then
    30. with response
    31. .write "Site home"
    32. end with
    33. end if
    34.  
    35. end function

    Get the idea??

    Hope this helps

    Kai hirst
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width