AXForum  
Zurück   AXForum > Microsoft Dynamics AX > DAX: За рубежом > DAX in English
All
Kennwort vergessen?
Registrieren Forum Rules Hilfe Benutzerliste Heutige Beiträge Suchen

 
 
Themen-Optionen Thema durchsuchen Ansicht
Alt 12.09.2014, 14:15   #1  
ist ist offline
ist
Участник
 
60 / 10 (1) +
Registriert seit: 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:
Code:
<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.

Alt 04.11.2014, 02:23   #2  
b_nosoff ist offline
b_nosoff
Читатель
Benutzerbild von b_nosoff
MCP
MCBMSS
 
197 / 143 (5) +++++
Registriert seit: 01.12.2004
Ort: Msk
Blog-Einträge: 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
 

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
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

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Gehe zu

Рейтинг@Mail.ru
Alle Zeitangaben in WEZ +3. Es ist jetzt 21:56 Uhr.
Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.