DotNetGnat
Programmer
guys,
here is the sample code in its simplest form
currently...the div tag appears at an absolute fixed position irrespective of where the button is situated.
How can I make it relatively to the position of the button.
Thanks in advance...
-DNG
here is the sample code in its simplest form
Code:
<html>
<head>
<script>
function showpop() {
_textForDisplay = "some text some text some text some text";
document.getElementById("alert_msg").innerHTML = _textForDisplay;
document.all['alert_msg'].style.left = "100px";
document.all['alert_msg'].style.top = "100px";
document.all['alert_msg'].style.width = "300px";
document.all['alert_msg'].style.height = "100px";
document.all['alert_msg'].style.padding = "5px";
document.all['alert_msg'].style.border = "1px solid black";
document.all['alert_msg'].style.background = "#FFFF99";
document.all['alert_msg'].style.display = "block"; //show
}
</script>
</head>
<body>
<div id='alert_msg' style='display:none; position:absolute'></div>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
Some sample text<br>
<form id="form1" name="form1">
<input type="submit" value="click" name="B1" onclick="showpop();return false;">
</form>
</body>
</html>
currently...the div tag appears at an absolute fixed position irrespective of where the button is situated.
How can I make it relatively to the position of the button.
Thanks in advance...
-DNG