Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message box with onMouseOver and onMouseOut

Status
Not open for further replies.

JohnBeals

Programmer
Feb 26, 2002
49
US
I want to create a message box that appears when mousing over a form entry description, and disappears when mousing out. It will contain help info on the entry.

I've seen this on lots of sites. I don't think Alert will do because I don't want the user to have to click an "OK" button. Just a box with them message, no buttons.

I have the onMouseOver and onMouseOut down, just need help creating the message box. Is it window.open that they use?

Thanks,
JB
 
this seems to work. however everytime the user goes over it it will open a new instance of the window I think
<input type=&quot;text&quot; name=&quot;txt&quot; onmouseover=&quot;window.open('help.htm', 'myWin', 'status, width=300, height=200');&quot;> You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
just tested it and all it does is refreshes the window so it should work perfectly

hope that helps You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
Yes, I ended up with this:

var HelpWindow
function MakeWindow(text)
{
HelpWindow = window.open(&quot;&quot;,&quot;&quot;,&quot;Height=100,Width=200&quot;)
HelpWindow.document.bgColor=&quot;#0033FF&quot;
HelpWindow.document.fgColor=&quot;#FFFFFF&quot;
page = &quot;<HTML><BODY BGCOLOR='#0033FF' TEXT='#FFFFFF'>text</BODY></HTML>&quot;
HelpWindow.document.write(text)
}

function CloseWindow()
{
if (HelpWindow)
{
HelpWindow.close()
}
}

and in the body

<td nowrap onMouseOver=&quot;MakeWindow('Enter 8 digit ID')&quot; onMouseOut=&quot;CloseWindow()&quot;><STRONG>ID:<STRONG></td>

Only problem is it seems to write one window, then closes that window and writes another with the text in it. There are no colors. The first window title says about:blank, and the second window shows my URL.

The fact that the window appears to pop up, pop out and pop back is annoying. The fact that no colors are displayed in the window is curious.
Hmmm...
JB
 
have you tried using title ???

<input type=&quot;text&quot; title=&quot;Enter your name&quot;>

I hope this helps,
[bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top