web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX 2012 html control

(0) ShareShare
ReportReport
Posted on by 27

I create a html control on AX.

And the text as below.

How i get the value from the html, so that i can update my table records.

public void init()
{
  str text = @"
<html>
<head>
<script type='text/javascript'>
<!--
function puls(textId) {
var text = document.getElementById(textId).value;
document.getElementById(textId).value = Number(text) + 1;
}
function reduce(textId) {
var text = document.getElementById(textId).value;
document.getElementById(textId).value = Number(text) - 1;
}
//-->
</script>
</head>
<body>
section1:
<input type='button' onclick='puls(&quot;T1&quot;)' value='+' />
<input size = '2' type='text' Id='T1' value='0'/>
<input type='button' onclick='reduce(&quot;T1&quot;)' value='-' />
</br>
section2:
<input type='button' onclick='puls(&quot;T2&quot;)' value='+' />
<input size = '2' type='text' Id='T2' value='0'/>
<input type='button' onclick='reduce(&quot;T2&quot;)' value='-' />
</br>
</body>
</html>";

    super();

    Html.setText(text);

2816.test.png

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,399 Most Valuable Professional on at

    Why do you want to complicate your live so much? Using native AX controls will be many times easier.

  • Sunny yun Profile Picture
    27 on at

    The first columns, the values are come from the records. So it will be dynamic, for the second columns, the customer want the value have the button + and - change the value.

  • Martin Dráb Profile Picture
    239,399 Most Valuable Professional on at

    Sure. But why don't you simply use normal AX controls such as IntEdit and buttons? What did you fail to implement with AX controls?

  • Sunny yun Profile Picture
    27 on at

    Yes, I think use AX controls is more simple.

    My consult give me some advice to  use html but it seems it became more complex.

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans