CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Using more than 1 parameter in an Ajax Autofill call

Print topic Send  topic

Author Message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.