Zobacz posty bez odpowiedzi | Zobacz aktywne tematy RSSKanał RSS



Odpowiedz  [ 1 post ] 
 JAVASCRIPT - CAN PANELS (EXPANDERS, GROUPBOXES,ETC.) 
Autor Wiadomość

Rejestracja: 10 Maj 2017, 08:23
Posty: 260
Post JAVASCRIPT - CAN PANELS (EXPANDERS, GROUPBOXES,ETC.)
I'm trying to use JavaScript to hide/show an expander panel based on the role of the current user. The problem has two parts.
The first problem is grabbing the role information. I'm thinking there is a CURRENT_USER variable available (I can't remember where I've seen an example). If true, then I'm wondering if a CURRENT_ROLE variable is also available. Then maybe I can use a GetFieldValue() call to grab it.
The second problem involves the HideSection()/ShowSection() methods. I thought this was the way to go, but the script actually crashes my browser session on load (oy!).
I realize I can show/hide fields using role privileges (which I do have in place already). But if a field is on an expander panel, the panel remains visible. For some roles I want to hide the panel completely so that they never have any clue the other fields might exist.
So, is any of this possible, or am I just dreaming? My script is below.
Please forgive obvious errors ... I've been a SQL/C++ programmer for years, happy to work under the hood while more "creative" GUI folks did their thing with front ends.
I'm just now starting to get more heavily involved with things like asp.net/javascript (yeah!). I'd appreciate it if anyone can save me the cost of buying a "real" JavaScript reference (at least for now). After all, we are in a recession!

More Details
advertising examples


17 Paź 2017, 10:51
Profil
Wyświetl posty z poprzednich:  Sortuj według  
Odpowiedz   [ 1 post ] 

Nie możesz zakładać nowych tematów na tym forum
Nie możesz odpowiadać w tematach na tym forum
Nie możesz edytować swoich postów na tym forum
Nie możesz usuwać swoich postów na tym forum
Nie możesz dodawać załączników na tym forum

Szukaj:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.

phpBB SEO