NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on August 15, 2020, 07:17:26 AM
-
Hi, Im trying to refresh a browse cell using ajax.
I can GET the value from the server but the problem is how to identify the id of the cell I must update.
In the attached pic you can see CVH in column 1 , using it I ask the server its price that I need to update in column 4
To update the price I need to know the cell id.
The ids seams to be divxxxxxxx_div where xxxxxxxx is a random number.
Is there any way to set the ids a different way so I can have a relation between CVH and its price cell?
Thanks
-
Hi,
I cannot see your picture. But i know what you are trying to do.
The best way to generate the contents of a cell in a browse is to use the original browse to do it. Then you don't need to know the div id as the browser knows it.
DO value::YourFieldName
Will do it. I expect you'll need to pass an event to the browse to get it to refresh the value for you.
I'd suggest creating a simple browse and utilise the existing fresh cell option to check what events are passed. Once you see that, you can do the same thing.
Regards
Bill
-
Thanks bshields, here goes the picture, I dont want to refresh all the browse, it can be done using NetRefresh and works ok but it is slow.
May be I dont understand what you mean because there are many ::YourFieldName, one per row.
-
Hi,
You can refresh only a cell. Each uniquely named div can be refreshed independently.
The code that generates the contents of the cell is DO value::YourFieldName.
You just have to watch how NT does it and do the same.
I've attached a screen cap of the place where NT does it.
Regards
Bill
-
Hi, where is this window from?
In my Browse and in my fields I dont find any settings like this, see pic.
-
hi alberto
the screen that bill put appears only when you use button - other button
jason
-
This is the function to know the id
p_web.DivHeader('bCotizaciones_Cot:Ultimo_'&Cot:ID,'',net:crc,,loc:extra)
where bCotizaciones is the browse name, Cot:Ulitmo is the name of the column field and Cot:Id the Id of the row record
The result is like:
<div id="div690197848_div" >
Then, I know the id to modify via javascript