What is a use of document.getElementById('header_attachment_list_label');

DS20
Tera Contributor

Hi,

  I found "var attachments = document.getElementById('header_attachment_list_label');
if (attachments.style.visibility == 'hidden' || attachments.style.display == 'none') " used in the onSubmit Catalog client script.

 why below elements are used:-

1.document.getElementById()?

2.From where "header_attachment_list_label" id is getting?

Is any alternative to document.getElementById() method.

 

Thanks in advanced.

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

Hi 

1) document.getElementById() is a DOM manipulation method to get the element from HTML code with the Id. As id for every element is different it can be used to get that particular element by it's ID (more like a unique key).

2) When you go to a particular page, press f12 there you'll see the html page in console with id's from there it is taken

3) You can use g_form too.

 

Mark correct if it helps.

 

Regards,

Omkar Mone

www.dxsherpa.com

View solution in original post

6 REPLIES 6

Omkar Mone
Mega Sage

Hi 

If i have answered your question please mark correct answer to close the thread.

Linda Eju
Tera Contributor

Hello , I want to follow up on this.

How do i use g_form?