|
12.09.2014, 14:15 | #1 |
Участник
|
Using Dynamics AX HTML control
Hi All,
My question is related to using html control in form design. I had to do changeable table structure which rows and colums number depends on some condition. The content of table cells is plain text. The choice was to use table control. I have done this solution and everything seems to be OK, but somethimes the table control not well redraws. I decided to use html control, so I altered the function that builds table control so that it does html document and passed it to html control. Everything works fine. Now I have to do table cell click event, so that when the user clicks on table cell, some buttons (from AX form design, not in html) to be enabled/disabled depends on clicked table cell content. First I had to get the content from table cell. I could do this through Javascript like this: Код: <script language="javascript" type="text/javascript"> var table = document.getElementById("tbl"); if (table != null) { for (var i = 0; i < table.rows.length; i++) { for (var j = 0; j < table.rows[i].cells.length; j++) table.rows[i].cells[j].onclick = function () { tableText(this); }; } } function tableText(tableCell) { alert(tableCell.innerHTML); } </script> I saw that html control has a method getElementById() which returns COM object, so I override onClick() event method on html control (right click on html control and choice ActiveX Explorer), but I don't know how to use COM object so that I can get innerHTML. Is there anyway to get html table cell content by X++ instead by Javascript? Regards, ist. |
|
04.11.2014, 02:23 | #2 |
Читатель
|
Returned COM is just HTML element. Try to use methods type(), name(), value(), also checked() for 'checkbox' and selected() for 'select' elements. And activeElement() method of HTML control you can find out useful.
|
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|