Dark-Hawk Posted April 8, 2009 Share Posted April 8, 2009 So I'm creating a calendar script and I want people to be able to mouse over the cells and and have a div/popup window come up that lets them enter some information to sign up for something on the date. What I have thus far is this, but it's not right: if ($the_day != " "); { echo "<a href= '#' id='hoverover' style='cursor:pointer;' onMouseOver='ShowPopup(this);' onMouseOut='HidePopup();'>"; echo "$the_day"; echo '</a>'; echo "\n"; }$the_day++; Then for the JavaScript: <script type='text/javascript'> function ShowPopup(hoveritem) { hp = document.getElementById('hoverpopup'); // Set popup to visible hp.style.top = hoveritem.offsetTop + 18; hp.style.left = hoveritem.offsetLeft + 20; hp.style.visibility = 'Visible'; } function HidePopup() { hp = document.getElementById('hoverpopup'); hp.style.visibility = 'Hidden'; } </script> And the DIV: <div id='hoverpopup' style='visibility:hidden; position:absolute; top:0; left:0;'> <table bgcolor='#0000FF'> <tr><td><font color='#FFFFFF'>This is my popup</font></td></tr> <tr><td bgcolor='#8888FF'>Hello I am a popup table</td></tr> </table> </div> So yeah ... that's what I have and I'm unsure how to get it to what I need... Any help is certainly appreciated. Quote Link to comment Share on other sites More sharing options...
Dark-Hawk Posted April 8, 2009 Author Share Posted April 8, 2009 Oh I forgot .. the popup window will be a form that needs to have information to be submitted in it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.