This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - How to generate an Alert message on after saving the form?

Harsha - Wednesday, September 12, 2012 6:33 AM:

 Hi,
  I have created a form with some dropdown and 'Item' fields.
I should generate an alert message based on dropdown and 'Item' field selection. For this I should compare the selected values of dropdown with 'Item'.

1)How to get 'Item' properties to compare with dropdown field value?.

2)I want to generate an alert message based on some conditions. How to generate alert message?

Please help me.

Thank you
Harsha



Brian - Thursday, September 20, 2012 8:24 AM:

Hi Harsha,

Since you are in an HTML form you use normal Javascript to manipulate the DOM.

Say you create a method on a field event triggered by the onChange event.

Attach this to the Dropdown field.

Inside the method you can then get at the values of the fields.

To get a field on the form use "var fld = document.getElementById("id of dropdown");"

Now you have the field you can get the value of the element.

var val = fld.Value

To show an alert you can either use the normal Javascript alert("message");

or you can use the top.aras.alertError("message");

Hope this helps,

Brian.