on 07-11-2012 5:07 PM
Hello,
How can i make a User interface in order to confirm a production orders?
I have a html form, how can i send the value of my form to my MII transaction?
Regards,
Victor
There are a couple ways you can do this.
The easiest way is through the iCommand applet.
1) Create an XACUTE query for your transaction, linking all the input parameters and output paramter.
2) Create an iCommand applet on your irpt page.
<APPLET NAME="giveMeaningfulName" CODEBASE="/XMII/Classes" CODE="iCommand" ARCHIVE="illum8.zip" WIDTH="0" HEIGHT="0" MAYSCRIPT>
<PARAM NAME = "QueryTemplate" VALUE="Path to XACUTE query you created. MII workbench allows drag and drop.">
</APPLET>
3) Setup and exacute the command through javascript on a button click or some other event.
//Make sure in the following example to change giveMeaningfulName to the name you gave your applet.
function buttonClicked()
{
var queryObject = document.giveMeaningfulName.getQueryObject();
queryObject.setParam(1, param1);
queryObject.setParam(2, param2);
.
.
.
queryObject.setParam(n, paramN);
var result = document.giveMeaningfulName.executeCommand();
if(result == false)
alert("Confirmation failed. Error message: " + document.giveMeaningfulName.getLastError());
}
Alternatively a more complex way is to use AJAX. This is a far better method since is runs asyncronously and doesn't lock the user's browser like java applets do.
try resarching how the XMLHTTPREQUEST object works in javascript and the url you want to call is.
http:\\miiserver:port\XMII\Runner?Transaction=Path to transaction&Param Name=Parameter Value&OutputParameter=Parameter Name
Transaction path starts at your project name and maps down to the transaction name without the .trx
Param Name is the actual name you gave your transaction parameters. Separate them by &.
This will return any output parameter that is non xml in the standard MII XML format of /Rowsets/Rowset/Row. If the output parameter is of type XML it will just return the XML.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.