FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WEBDEV 2024
→
Performing a check exiting from a cell, values not current but previous
Performing a check exiting from a cell, values not current but previous
Débuté par busfra, 18 déc. 2018 12:28 - Aucune réponse
Connectez-vous…
busfra
#1
Membre enregistré
19 messages
Posté le 18 décembre 2018 - 12:28
Good morning
in Webdev 23 last update 53k, after some bad tests, I think there is a bug (but I hope I'm wrong..)
I try to explain
I have a page with an Ajax table control based on a db table
I'm trying to make some check on the values exiting from a single cell of this table control
I see that I can do that ONLY by calling an Ajax procedure on the code, browser side.
Then, in my "Exit with modification" (OnChange) code or "Control Exit"(on blur) I put an AjaxExecute to my procedure.
In order that I can't refer directly to a table column in Browser code, I want pass to my procedure a string containing the name of that control (table.column).
In my Procedure then I read by indirection the value of the cell.
The problem (I think a bug) is that the call returns always the value BEFORE the modification, the previous value
In fact I try this:
- I write "Test" in the cell
- the event fires
- my procedure receives the name of the column and the indirection get an empty field
- I return to the cell
- I update the value in "After test"
- the event fires and the procedure returns "Test" (the "before" value)
Am I wrong?
Is there another way to perform a check on the table cell value?
Another question please: in the same table I set the input size of a text column, but, at runtime, the input is not stopped to the requested size (in a form all is right): why?
Follows code of tha Ajax call and my Ajax procedure
// ONCHANGE (browser)
IF AJAXAvailable() = True THEN
Res is string
Res = AJAXExecute(ajaxUpdateControls,CheckObjectSize,"PAGE_Form_Tranfer_Goods.TABLE_Smt_p_transfergoodsdetails.COL_MaterialCode")
END
=======================
//Global procedure
PROCEDURE CheckObjectSize(sControl is string)
cmd_testedValue is string = {sControl+"..Value"}
cmd_linkfile is string= {sControl+"..FileLink"}
aa is string = smt_p_transfergoodsdetails.MaterialCode..Size
cmd_sizeOnDB is int = {cmd_linkfile}..Size
ToastDisplay(cmd_testedValue)
IF Length(cmd_testedValue) > cmd_sizeOnDB THEN
RESULT False
END
RESULT True
Thanks
Franco
Signaler
0
0
→ Revenir à WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte