Jan K. van Dalen
|
| Posted: 12/03/2008, 6:01 PM |
|
Ok, I'm a bit puzzle as most of my development experience is in the Windows
world on how all of these technologies work together.
I have a update form in which I have 2 entry fields (numbers) and 1 label
which should display the addtion of the 2 fields right after a user enters
any number in either field. Also, the content of the label is a column in a
database.
How do I update the label info while the user is entering data? I'm
guessing Javascript... any help is welcome.
|
|
|
 |
kevind
Posts: 251
|
| Posted: 12/13/2008, 6:20 AM |
|
yes, for immediate update, you need javascript - i currently use JQuery with CCS 3.x - it has very handy ways of referencing elements in any given web page as well as event handling - if you are using CCS 4.x, you can use the built in Prototype javascript framework (i'm not familiar with that framework).
to update a column in the underlying database there are 3 approaches:
1) add a hidden field to the record form and either use javascript to push values to it
2) same as 1 but, use a before update event in the record form and retrieve value action to retrieve a value for the hidden field calculated from the 2 textboxes
3) under the data tab of the record form, you can create a custom insert/update to calculate the database field and set the expression as the source of the field's data
these are some of the ways that i've approached it in the past - number 3 is perhaps simplest for database updates/inserts and you can take different actions to calculate the field depending on whether it is a new record or an update
hope that helps
kd
_________________
thanks
Kevin
======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
|
 |
 |
Jan K. van Dalen
|
| Posted: 12/19/2008, 12:52 PM |
|
Hi Kevin ... sorry for the delayed thanks !!!!
"kevind" <kevind@forum.codecharge> wrote in message
news:24943c4c3a9831@news.codecharge.com...
> yes, for immediate update, you need javascript - i currently use JQuery
> with CCS
> 3.x - it has very handy ways of referencing elements in any given web page
> as
> well as event handling - if you are using CCS 4.x, you can use the built
> in
> Prototype javascript framework (i'm not familiar with that framework).
>
> to update a column in the underlying database there are 3 approaches:
> 1) add a hidden field to the record form and either use javascript to push
> values to it
> 2) same as 1 but, use a before update event in the record form and
> retrieve
> value action to retrieve a value for the hidden field calculated from the
> 2
> textboxes
> 3) under the data tab of the record form, you can create a custom
> insert/update
> to calculate the database field and set the expression as the source of
> the
> field's data
>
> these are some of the ways that i've approached it in the past - number 3
> is
> perhaps simplest for database updates/inserts and you can take different
> actions
> to calculate the field depending on whether it is a new record or an
> update
>
> hope that helps
> kd
> _________________
> ======================
> CCS 3.2.x / ASP / MS Access
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
|