SplineTech AJAX ComboTable FAQ

How do I use it?

The component is contained in 4 files that you include

These 3 you include in HTML

<LINK href="spline_ajax_general.css" type=text/css rel=stylesheet>
<SCRIPT src="spline_ajax_combo.js" type=text/javascript></SCRIPT>
<LINK href="spline_ajax_look.css" type=text/css rel=stylesheet>

And this one into your ASP that generates HTML and that generates the <table> with results

<!-- #include file="spline_ajax_asp.inc"-->

 

 

What is the main concept?

This AJAX control is an <input> tag which calls onKeyUp=ajax_key_up(......) function that's defined in spline_ajax_combo.js, that you include in your HTML

When you type anything into the <input> ajax_key_up function is called and the request is sent to the ASP url you specified with required parameters and that ASP returns <table>...</table> tag filled with data that ajax_key_up displays

The style of that table, such as the background, padding and everything else is defined in spline_ajax_look.css that you include in your HTML.

This file is used to customize the look of the table.

 

 

How could I make it do what I want?

Just set the parameters of ajax_key_up and there are quite a few.

1. Have your recordset that you want to display in your mind

2. Decide which fields to show, for example let's say you want to display First Name, Last Name and Title, and they are stored in your recordset under the field names of "fn,ln,title". So you set the show_fields parameter of ajax_key_up to show_fields="fn,ln,title", this is parameter #10. This parameter is sent to your ASP and is picked up by our function gen_ajax_table defined in spline_ajax_asp.inc and gen_ajax_table takes your recordset and already knows which fields to show

3. Fields usually need titles. Rarely the field names are presentable as titles. So you set a field_titles parameter (#11) to field_titles="First Name,Last Name,Title". This parameter is also sent to your ASP and is picked up by gen_ajax_table. From then on, gen_ajax_table reads it and adds <th> tags into the <table> with the test you specified.

Now you should have a feel of how SplineTech AJAX control is used. We use this technique of specifiying and sending parameters practically for all parameters that we use.

 

How to specify which <input> box to update when user clicks a row?

Set the parameter #9 htmlid to a string, such as: htmlid="fn=input_it_for_first_name,ln=input_id_for_last_name,title=input_id_for_title", where input_id_for_first_name is the id attribute of the <input> tag that shows first name: <input id="input_id_for_first_name"></input>

 

Can I set the value of <select> tag similarly?

Yes.

 

Can I use a field that is not in show_fields?

Yes, gen_ajax_table has access to all fields in your recordset, so you can specify in htmlid parameter a field name that is not in show_fields and in fact the <input> tag id that is hidden as well.

 

What do asp_parameter_names and asp_parameter_input_id_values do?

When you have several <input> boxes like we do on the main page here, ajax_key_up needs to know if they are linked together or not. Should it for example check the minimum number of entered letters among all linked <input> tags or not. So when it sees string values in those 2 parameters it knows that it needs to link up all input tags together and treat them as essentially 1. And it uses the values of asp_parameter_names to add querystring parameters to the URL that you specified in parameter #5. So since your recordset depends on the values user enters in the corresponding <input> tags, you will hardcode in your ASP something like fn=Request.QueryString("fn"), where "fn" is specified in asp_parameter_names, and "input_id_for_first_name" is specified in asp_parameter_input_id_values. For example:

asp_parameter_names="fn,ln,title"

asp_parameter_input_id_values="input_id_for_first_name,input_id_for_last_name,input_id_for_title"

ajax_key_up knows that in the URL it will call it should add ...?fn=(the value taken from input_id_for_first_name box)&ln=(the value taken from input_id_for_last_name box)&etc.


Contact us using this form

line

Name 
E-mail 
Comments
(speak your mind)

 

 

     
     

SplineTech Ajax Control. It Works.

     
 

Copyright 1999-2024 Spline Technologies Corporation .
All rights reserved