Page 1 of 1

Button to start a javascript

Posted: 21 Oct 2020
by TWendt
Hi all,

if its possible to create a button to start a javascript without saving. If it is possible,can you give me an example?

Best wishes
Tom

Re: Button to start a javascript

Posted: 22 Oct 2020
by mnikitina
Hello Tom,

You can add a custom button to the form and add any JavaScript code to the button's OnClcik settings.
Capture.PNG
Capture.PNG (13.43 KiB) Viewed 11741 times

-

Posted: 18 Dec 2020
by BrandonSoync
Hi Jan, hi Leutz,

wie kann ich ein Radio Button:

<form name=formular>
<input type=radio name=bla value=1 checked>
<input type=radio name=bla value=2>
</form>

durch ein JavaScript umchecken:

function prelect

document.getElementByIdbla.value2.checked = true;


geht nicht

document.formular.bla2.checked = true;

auch nicht. Gehts überhaupt?

Re: Button to start a javascript

Posted: 24 Dec 2020
by mnikitina
Hello BrandonSoync,

Please see the article on how to get or set SharePoint form field programmatically:

https://spform.com/javascript-framework ... eld-values