"Randy Webb" <Hi************ @aol.comwrote in message
news:et******** ************@te lcove.net...
Eric Layman said the following on 2/4/2007 2:58 AM:
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
>Thanks.
How does onmousedown and up helps?
It tells you when they hold the mouse down.
>Don't they cancel out each other?
No. The onmousedown gets triggered, they drag the mouse, the mouse is
released and the onmouseup gets triggered.
onmousedown="va r mouseIsDown=tru e"
onmousedown="va r mouseIsDown=fal se"
And then when the mouse is being dragged/moved, you check the state of
mouseIsDown.
Your posting agent is severely broken.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/
Thanks for the advice!
Here's the script I've conjured based on your tips!
My idea is to have multiple selection of table cells if user holds the mouse
down and "drags" the mouse over other cells.
But now I have problem with "deselectin g" the selected cells. My logic seems
flawed here. (yes i know the html is malformed. i just wanna test out the
idea =) )
Any comments?
<script language="javas cript">
var mouseIsDown = false;
function md()
{
mouseIsDown = true;
}
function mu()
{
mouseIsDown = false;
}
function check(cid)
{
var obj;
obj = document.getEle mentById(cid);
if(mouseIsDown)
{
if(obj.getAttri bute('bgColor') =="blue")
{
obj.getAttribut esetAttribute(' bgColor','white ');
}
else(obj.getAtt ribute('bgColor ')=="white")
{
obj.setAttribut e('bgColor','bl ue');
}
}
}
</script>
<body id="b1" >
<table width="100%" border="1" cellspacing="0" cellpadding="0" >
<tr>
<td id="d1" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d1');">&nb sp;</td>
<td id="d2" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d2');">&nb sp;</td>
</tr>
<tr>
<td id="d3" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d3');">&nb sp;</td>
<td id="d4" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d4');">&nb sp;</td>
</tr>
<tr>
<td id="d5" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d5');">&nb sp;</td>
<td id="d6" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d6');">&nb sp;</td>
</tr>
<tr>
<td id="d7" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d7');">&nb sp;</td>
<td id="d8" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d8');">&nb sp;</td>
</tr>
<tr>
<td id="d9" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d9');">&nb sp;</td>
<td id="d10" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d10');">&n bsp;</td>
</tr>
<tr>
<td id="d11" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d11');">&n bsp;</td>
<td id="d12" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d12');">&n bsp;</td>
</tr>
<tr>
<td id="d13" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d13');">&n bsp;</td>
<td id="d14" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d14');">&n bsp;</td>
</tr>
<tr>
<td id="d15" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d15');">&n bsp;</td>
<td id="d16" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d16');">&n bsp;</td>
</tr>
<tr>
<td id="d17" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d17');">&n bsp;</td>
<td id="d18" onMouseDown="md ();" onMouseUp="mu() ;"
onMouseOver="ch eck('d18');">&n bsp;</td>
</tr>
</table>
</body>
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com