Dave "Crash" Dummy
2014-09-27 14:11:42 UTC
The code below is a simplified version of code I use to edit cell
content in a table. It works fine. I can change style, text, whatever.
What I would like to do is read the row and cell location. My fantasy
code would read something like "r=obj.row.number" and "c=obj.cell.number."
Is there such a thing in the real world?
'---------------------------------- Demo.hta
--------------------------------------------
<HTA:APPLICATION ID="oHTA" APPLICATIONNAME="Demo" WindowState="maximize">
<html><body>
<TABLE id="tbl" border=1>
<TR><TD onClick="hilite(this)">Text</TD><TD
onClick="hilite(this)">Text</TD></TR>
<TR><TD onClick="hilite(this)">Text</TD><TD
onClick="hilite(this)">Text</TD></TR>
</TABLE>
</body>
<script type="text/vbs">
sub hilite(obj)
if obj.style.fontWeight="bold" then
obj.style.fontWeight="normal"
else
obj.style.fontWeight="bold"
end if
end sub
</script>
</html>
content in a table. It works fine. I can change style, text, whatever.
What I would like to do is read the row and cell location. My fantasy
code would read something like "r=obj.row.number" and "c=obj.cell.number."
Is there such a thing in the real world?
'---------------------------------- Demo.hta
--------------------------------------------
<HTA:APPLICATION ID="oHTA" APPLICATIONNAME="Demo" WindowState="maximize">
<html><body>
<TABLE id="tbl" border=1>
<TR><TD onClick="hilite(this)">Text</TD><TD
onClick="hilite(this)">Text</TD></TR>
<TR><TD onClick="hilite(this)">Text</TD><TD
onClick="hilite(this)">Text</TD></TR>
</TABLE>
</body>
<script type="text/vbs">
sub hilite(obj)
if obj.style.fontWeight="bold" then
obj.style.fontWeight="normal"
else
obj.style.fontWeight="bold"
end if
end sub
</script>
</html>
--
Crash
"The fewer the facts, the stronger the opinion."
~ Arnold H. Glasow ~
Crash
"The fewer the facts, the stronger the opinion."
~ Arnold H. Glasow ~