AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: За рубежом > DAX in English
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 12.09.2014, 14:15   #1  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
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>
but how could I pass innerHTML (clicked table cell content) to AX?
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  
b_nosoff is offline
b_nosoff
Читатель
Аватар для b_nosoff
MCP
MCBMSS
 
197 / 143 (5) +++++
Регистрация: 01.12.2004
Адрес: Msk
Записей в блоге: 13
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.
__________________
Axapta non erubescit
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: AX Performance Troubleshooting Checklist Part 1B [Application and AOS Configuration] Blog bot DAX Blogs 0 05.09.2014 21:11
atinkerersnotebook: Configuring Production Control Within Dynamics AX 2012 Downloadable As PDF Blog bot DAX Blogs 0 01.07.2014 22:11
DAX: Official Dynamics AX 2012 R2 Content (update) - Where is it, and how can you find out about updates? Blog bot DAX Blogs 0 03.12.2012 11:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
gatesasbait: Dynamics AX 2009 SSRS and SSAS Integration Tips Blog bot DAX Blogs 3 09.07.2009 13:07

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 19:27.