RoyBaird
Posts: 115
|
Posted: 03/04/2010, 6:02 AM |
|
you can use an AutoFill Feature that utilizes values of two or more textboxes. Create an Autofill feature that is 'based' on your textbox that will fire the Ajax request. In order to pass additional parameter to AutoFill Ajax feature please follow the steps:
1. modify the Autofill request call (in the HTML code), by adding the second parameter e.g.
new Ajax.Request("services/AutoFillTest_NewRecord1_TextBox1_PTAutoFill1.php?keyword=" + encodeURIComponent($("NewRecord1TextBox1").value).replace(/'/g, "%27") + "&MyParam=" + encodeURIComponent($("NewRecord1TextBox3").value).replace(/'/g, "%27"), {
Please remember to use real names in the code. You will recognize your first parameter in place of "NewRecord1TextBox1" above.
2. open corresponding service page, open Data Source dialog of the Grid form and add new WHERE parameter of URL type and name "MyParam" (in this example).
Be careful of the syntax in the HTML call to Ajax. You can name the second or third parameters anything you wish, but of course it must be the same in the WHERE clause of the Ajax service.
It is that simple, but it took me a couple of false starts.
_________________
Roy |
|
|
|