PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
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
Started by busfra, Dec., 18 2018 12:28 PM - No answer
Connect yourself…
busfra
#1
Registered member
19 messages
Posted on December, 18 2018 - 12:28 PM
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
Report
0
0
→ Go back to WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text