frank001
05-11-2005, 06:41 PM
Hi,
How can I access the coordinates of the browser rendered HTML controls?
I tried HTML DOM from JScript, but those properties gave nothing back.
Steps:
1. Server generates a html source and send to the browser.
2. Browser renders html source and makes the site.
3. JScript is running in the site and trying to get coordinates of the HTML controls (radio buttons, text fields, ... )
for example:
var Element = document.getElementById( "1" );
alert(Element.style.left); // shows nothing
alert(Element.style.top); // shows nothing
or
var table = document.getElementById('table');
var row = table.rows[1];
var cell = row.cells[2];
alert(cell.width); // shows nothing
These properties are empty!
Why?
How can I get these values?
Thanks,
Frank
How can I access the coordinates of the browser rendered HTML controls?
I tried HTML DOM from JScript, but those properties gave nothing back.
Steps:
1. Server generates a html source and send to the browser.
2. Browser renders html source and makes the site.
3. JScript is running in the site and trying to get coordinates of the HTML controls (radio buttons, text fields, ... )
for example:
var Element = document.getElementById( "1" );
alert(Element.style.left); // shows nothing
alert(Element.style.top); // shows nothing
or
var table = document.getElementById('table');
var row = table.rows[1];
var cell = row.cells[2];
alert(cell.width); // shows nothing
These properties are empty!
Why?
How can I get these values?
Thanks,
Frank