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

Notifications

Announcements

No record found.

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
    237,965 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
    237,965 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans