I'm sorry, I still don't understand WHERE this menu that shows the clicked on id is supposed to appear.
You mean you *DO* want it to show in that small map space??? It seems to me like that space is so limited already it would be better if it appeared to the side or above, even if it temporarily covered up another part of the display.
**********
I don't understand *WHAT* height and width you are trying to calculate. Or of what, if you will.
I agree about double click: If you are trying to work with as many devices as possible, I would avoid that. My wife uses a NOOK, for example, and double click is nearly impossible on it. You can try a dozen times before it works.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Oh...you want the height and width OF THE FULL MAP!
Don't calculate it! ASK for it!
In my code, for example, you could get it as indicated:
Code:
...
// set up all the cells:
for ( var r = 0; r < theMap.length; ++r )
{
var row = theMap[r];
var tr = tbl.insertRow(-1);
for ( var c = 0; c < row.length; ++c )
{
var cell = tr.insertCell(-1);
cell.id = "C" + (theMap.length - r) + "_" + (c+1);
cell.className = classes[row.charAt(c)];
cell.onclick = cellClick;
}
}
alert( tbl.scrollWidth + " by " + tbl.scrollHeight );
...
You, of course, would store the values rather than alert them.
On Chrome, I got 2396 by 1192.
Ahh...good...MSIE 9 gave the same answer!
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
I know this should be fairly straight forward, however when I delete;
Code:
<div id="popon" style="display:block; margin-top: 100px;">
You just clicked on cell <span id="whichClicked"></span>
<br/>
The cell type is <span id="typeClicked"></span>
<br/>
<i>(click to close)</i>
</div>
Where it currently is, the map breaks, I cannot seem to follow what you've said above correctly to get it to work...
On second thoughts, where the content shows for the tabs, I'll have it displayed there for the entire space and have an [x] in the corner, but not as one of the tabs contents.
However I am very tired at this moment in time and cannot even find out how the...
On second thoughts, where the content shows for the tabs, I'll have it displayed there for the entire space and have an [x] in the corner, but not as one of the tabs contents.
However I am very tired at this moment in time and cannot even find out how the...
Code:
<i>(click to close)</i>
...Closes the div!
Don't know how yo missed it. I even COMMENTed it. (HINT: Use comments in your own code!)