View Full Version : positioning a div

05-28-2004, 02:19 PM
I am having trouble positioning this div. I want it to show up as a tool tip just right of the input, select or button. But it is staying in one spot on the screen. At least the vertical scroll is being taken into account as planned. That is as the user scrolls down the screen the prompt box moves down accordingly. Actually that doesn't need to be there at all. If I am keying off of the input or whatever I just want to set the div near by.

function doPrompt(which)
var ln=document.getElementById("promptLine");
var bx=document.getElementById("promptBox");
bx.style.pixelLeft=which.style.pixelRight - document.body.scrollLeft;
bx.style.pixelTop=which.style.pixelTop + document.body.scrollTop;

function unPrompt()
var bx=document.getElementById("promptBox");

<div id="promptBox" style="visibility:hidden;position:absolute;">
<table id="promptLocation" >
<td id="promptLine" width="100%" class="CellNormal">Prompt goes here.</td>

The onMouseOver Fires the function and passes an integer.
I appreciate your help on this.

Sure appreciate your help.