Hi all,
Here is a tip on how to set a custom title in the browser window/tab (i.e. where you´re app name is displayed. This fix, changes the app name to something else). I have tested it on the latest versions of Chrome, Firefox and IE and it works on all browsers.
1. Create file "appname.js" in folder "C:\AwareIM\Tomcat\webapps\AwareIM\aware_ext".
2. Add the following to the appname.js file where the document.title is your new app name:
function Func1()
{
document.title = "New app name";
}
function Func1Delay()
{
setTimeout("Func1()", 500);
}
Func1Delay()
3. Add the following without the brackets (;aware_ext/appname.js) AFTER the theme you are using in file "themes.props" in folder "C:\AwareIM\bin\" (this can be added to all themes I guess i.e. you can add it to the "Blue" theme if you want to or you can create your own theme (MyTheme) and add it to the "MyTheme" theme. Here is an example using "MyTheme":
ThemeMyTheme=MyTheme;ext-4.1.0/resources/css/ext-all.css;aware_ext/appname.js
4. Restart AwareIM server.
5. Reload your browser / log in to your application and now when your theme is loaded so is your custom title for that theme.
Notes:
The fix above works setting the page title after a delay (just using document.title doesn´t work because the newly set title gets changed back to the BS name title again so a delay is needed. Having the timeout as
500 (as above) seems to work and the delay is enough to work and enough so the user doesn't see the change (in some cases the user briefly sees the old title but it´s barely noticeable).
Additional info:
http://www.javascripter.net/faq/windowti.htm
http://stackoverflow.com/questions/4134 ... ages-title
http://www.geekpedia.com/KB55_How-do-I- ... elay).html
http://www.w3schools.com/jsref/met_win_settimeout.asp
Custom browser tab title
Custom browser tab title
Henrik (V8 Developer Ed. - Windows)
Re: Custom browser tab title
There is one more way to fix title of app. Please check the attachment.
- Attachments
-
- Visual Perspectives Screenshot
- AIM_2016-10-12_13-31-11.png (65.5 KiB) Viewed 14834 times
From,
Himanshu Jain
AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Himanshu Jain
AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Re: Custom browser tab title
I'm only seeing a screen shot attachment .. not the code to make it work.
Tom - V8.8 build 3137 - MySql / PostGres
Re: Custom browser tab title
Code: Select all
document.title = "Hello World";
I hope you find this time....
From,
Himanshu Jain
AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Himanshu Jain
AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Re: Custom browser tab title
Great tip Himanshu!
If you switch VPs during a user session, does this render script need to be in each new VP that is displayed?
If you switch VPs during a user session, does this render script need to be in each new VP that is displayed?
Tom - V8.8 build 3137 - MySql / PostGres
Re: Custom browser tab title
Yes, TomIf you switch VPs during a user session, does this render script need to be in each new VP that is displayed?
From,
Himanshu Jain
AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Himanshu Jain
AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL