Custom Window Name when pointing to page in title

nixthenext
nixthenext Community Member Posts: 75

The Window Name is used internally by the browser. Windows with the same name replace each other. It has no effect on what is displayed in the browser bar. To change that you have 3 options:

1. Name the popup page (in the left pane) what you want to display. You can use the same name as the source page. Of course, if you come here from multiple pages, this will not work.

2. Check/select Web 2.0 style popups when publishing. Now you will have the course name in the bar and it will look different. You may also have to select that on the Window Properties page.

3. Use the code below - an exerpt from my book on Javascript secrets. It works on regular windows, NOT Web 2.0 popup windows.

To change the ½ inch bar at the top of the window which normally contains the page name, create an HTML object with this code. Remember you must have an action on the page that references the CurrentTitleName somehow.

x = VarCurrentTitleName.value;

x = x + " Course" + unescape("%A0%A0%A0%A0%A0%A0%A0%A0%A0%A0%A0");

// the above inserts spaces to move the browser name to the right

document.title = x; 

You can change x to be something constant instead of the variable shown here.