CA Service Management

How to get names of the form elements 

Jun 09, 2015 02:07 AM

Sometimes you need to get form elements names or id's to do some manipulations with the forms on the client side ( e.g. hide/disable some fields or trigger on field changes). You can easily do this by using development tools of your browser. Developer tools can be accessed particularly on any modern browser by pressing F12. This tutorial shows how to get Major Incident checkbox name by using IE developers tool

1. Press F12 and in developer menu choose DOM Explorer ()

f12.PNG

2. Focus the mouse pointer and click on control that you want to inspect

focus.PNG

3. Review the results

result.png

 

As you see the name of the Major Incident checkbox is CBX.major_incident. Now you can use javascript to do some manipulation for example to hide it you can use statement like this:

document.main_form.elements["CBX.major_incident"].style.display = 'none';

Statistics
0 Favorited
7 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.