TWebForm.GetElementHandle

Hi,

Question to TWebForm.GetElementHandle, why this method doesn't return the span object which is connected to particular page/form in the WEB Core. When I use this I get whole body part.

Or How can I get handle to span element which is connected to the TWebForm in html?

GetElementHandle does not always return the BODY element.
On normal pages, there is not a SPAN element.
So, under what exact circumstances do you get a wrong element returned?
Please isolate and provide a sample source project with which we can reproduce an issue.

Hi,

Repro project in attachement.
Repro steps:

  1. Click "Open second Page"
  2. Click "Get Element Handle" and on dev tools console you should get an object from console.log(self.GetElementHandle)

Why whole document body not pointed span which is second page html render ?

testGetElementHandle.zip (36.8 KB)

We cannot change this as it would break several related things but we will expose a property with which you can get the desired element.

Ok thx ... it should solve this issue.
Maybe good idea will be add property ElementID to the TWEBForm because for now we haven't connection between form/page and html ... but it is for your consideration.

In the demo Demo\Basics\FormHosting you can see how you can map a form on a HTML element, in case of this demo on the panel HTML DIV element for example.

Hi,

We cannot change this as it would break several related things but we will expose a property with which you can get the desired element.

Was it done in version 2.5.0.0?
I can't find any information about it in the release notes to 2.5.0.0 version.

No, this needs more time as it potentially affects too much.

ok ... thank you