Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,
My requirements are as follows:
1) It should be in javascript and html datagrid only
2) In html-datagrid table ...mouseover on cell(coloumn) pop-up should be appear
3) It should be come out from the browser(pop-up)
4) It shoulb be use Javascript only
5) Here I am sending you 2 javascripts and 2 types of outputs.
6) Copy in notepad and view in html
7) The window should not be have any borders.
Please help me on this.

XML
<html>
<head>
<title>pop-up</title>

<style type="text/css">

.popup {
border:#333;
font-family: Tahoma;
font-size: 12px;
display: none;
position: absolute;
z-index: 60;
}

.popuptitle {
position: relative;
background: blue;
color: white;
font-weight: bold;
height: 10px;
padding: 5px;
visibility:hidden;
}

.popuptitle input {
position: absolute;
font-size: 75%;
right: 2px;
top: 2px;
}

.popupbody {
background: #ddd;
padding: 5px;
text-align: center;
}

#popup1 { top: 100px; left: 50px; width: 500px;}
#popup1 iframe { width: 305px; height: 204px;}


</style>

<script type="text/javascript">

function popupWindow(o,u)
{
// o - Object to display.
// u - URL to display, null = hide popup.

var obj = document.getElementById(o);

if(u)
{
obj.style.display = 'block';
window.open(u,o);
}
else
obj.style.display = 'none';
}

</script>
<script type="text/javascript">
<!--
function popup11(url)
{
var width = 305;
var height = 205;
var left = 150;
var top = 100;

var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', statusbar=no';
params += ', toolbar=no';
params += ', addressbars =no';
params += ', menubar=no';
params += ', display=no';
params += ', iframes=no';

newwin=window.open(url,'windowname5', params);
if (window.focus) {newwin.focus()}
return false;
}
// -->
</script>
</head>
<body>
<div>
<input type="button" value="Centered popup window" "javascript: void(0)"
onclick="popup11('C:/Users/ravi/Desktop/image.html')">

<div id="popup1" class="popup">

<iframe name="popup1" class="popupbody"></iframe>
</div>



<h1>Popup Style Window Using Elements</h1>

<input type="button" value="Click For POP-Up" onClick="popupWindow('popup1','C:/Users/ravi/Desktop/image.html') ;"/>

</div>
</body>
</html>
Posted
Updated 3-Feb-11 22:01pm
v2
Comments
LittleYellowBird 4-Feb-11 4:02am    
Hi, you will probably get more help if you explain what your problem is, what is your code doing wrong? What error are you having difficulty with? :)
Sunasara Imdadhusen 4-Feb-11 4:58am    
What you want? and What problem do you have?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900