How can i set the toggle button on default value every time when the page gets reload?

piyu
Kilo Contributor

Hello Everyone

I want to set my toggle button on default value whenever the page gets reload.

Can anyone please tell what changes i have to do in the script or CSS for this?

2 REPLIES 2

Nana5
Mega Guru

Hi Priyanka,


Your question is not much clear.It would be great if you will explain in detail. As per my understanding you want to set toggle so here is example below.


help text set as display on load.



function onLoad() {



    var test= g_form.getControl('description');


    toggleHelp(test.id);


  var varEnt = g_form.getControl('xyz');


    toggleHelp(varEnt.id);


}



let me know if any concern.



Thanks


Prakash


piyu
Kilo Contributor

Hi Prakash


See this is my toggle button on Service desk page and here on 0 i am showing all articles and for 1 only some specific articles on the sd portal page.


so here i want to set 0 as default,whenever i reload this page it should set 0 as the default.


There are css,dynamic content and script includes are involve for this page.


toggle.png