I suggest looking just a 'bit' farther:
http://jquery.com
The jquery environment provides a much simpler way to access the HTML dom,
and to implement
ajax/JSON functionality.
--
DonB
http://www.gotodon.com/ccbth
"andy" <
andy@forum.codecharge> wrote in message
news:5467ad3ee50e24@news.codecharge.com...
> If you are looking for a neat solution to populate fields in a form based
upon
> another field in the same form that looks up related fields from another
table
> then returns them to the form without having to refresh or submit the
form, then
> look no further...
>
> The code can be found at :
>
>
http://www.dhtmlgoodies.com/index.html?whichScript=ajax_client_lookup
>
> Follow the instructions there and download the script and apply to your
form.
> A few things that will hopefully save you some time:
> 1) You need to create a matching "id" for the lookup field on your form in
the
> data format properties ("
ClientID" in the example).
> 2) You need to specify the name of the form. Click on the form and see
under
> "Name" on the Data Properties tab in CCS. This form name should be entered
where
> it says '
clientform' in the head section of the example:
>
>
function showClientData()
> {
> var formObj = document.forms['clientForm'];
> eval(ajax.response);
> }
>
> 3) You may find that you need to simplify or modify the following line of
code
> in the head section of the example given
>
>
if(clientId.length==4 && clientId!=currentClientID){
>
> by changing it to:
>
>
if(clientId!=currentClientID){
>
> 4) Make sure you get the path right that corresponds to the folder in
which you
> put the file "
ajax.js"
> In the head section of the example they give:
>
<script type="text/javascript" src="/AJAX/ajax.js"></script>
>
> I change the above to:
>
<script type="text/javascript" src="AJAX/ajax.js"></script>
> and placed the
ajax.js file in root/
AJAX folder.
>
> I hope this helps. It's worth the fiddle.
> _________________
> Many thanks
>
> Andy
> ---------------------------------------
> Sent from YesSoftware forum
>
http://forums.codecharge.com/
>