This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Username in visu
#5
Hi,

1) Should also be possible from apps/data/yourappfolder
2) Yes, not tested, i position the element with a text and after that i changed text to space because it looked cleaner, never tried to fetch it again .. Sorry (:

Maybe it's better to do it like this so you don't see initial text:

Add this to custom css
Code:
.username {
   display: none;
}

and add this to the custom javaScript:
Code:
$(function(){
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
     if (xhttp.readyState == 4 && xhttp.status == 200) {
        var res = xhttp.responseText;
        if (typeof(res) !== "undefined" && res !== null){
           var uppercaseRes = res.charAt(0).toUpperCase() + res.slice(1);
           $(".username").html(uppercaseRes);
           $(".username").css("display","initial");
        }
     }
  };
  xhttp.open("GET", "/user/user.lp", true);
  xhttp.send();
});
BR,

Erwin
Reply


Messages In This Thread
Username in visu - by Thomas - 16.10.2017, 16:34
RE: Username in visu - by Erwin van der Zwart - 16.10.2017, 17:56
RE: Username in visu - by Thomas - 17.10.2017, 09:27
RE: Username in visu - by Thomas - 17.10.2017, 12:10
RE: Username in visu - by Erwin van der Zwart - 17.10.2017, 14:56
RE: Username in visu - by JohnTH - 05.02.2020, 11:22
RE: Username in visu - by admin - 05.02.2020, 12:06
RE: Username in visu - by JohnTH - 11.02.2020, 06:46
RE: Username in visu - by admin - 11.02.2020, 07:47
RE: Username in visu - by JohnTH - 11.02.2020, 10:53
RE: Username in visu - by admin - 11.02.2020, 10:56
RE: Username in visu - by JohnTH - 11.02.2020, 11:28

Forum Jump: