J
Julian Hayward
I have a page which contains a Windows Forms UserControl and several
DIVs within a table. When the mouse is moved over the UserControl,
it ends up calling the following Javascript:
function Map_mouseMoved()
{
var map = document.getElementById("Map"); // the UserControl
var msg = document.getElementById("Msgbox"); // a DIV
if(map != null)
{
if (msg != null)
{
msg.innerHTML = map.getMessgage();
}
window.status = map.getMessage();
}
}
The getMessage() function returns a string which indicates the mouse
position. What I see when I run it is, when I move the mouse over the
control the text gets written to the status bar every time the mouse
moves by a pixel (OK), but the message DIV only changes when the mouse
enters or leaves the control. I know this function is being called,
so how can I force the browser to refresh the DIV?
The strange thing is, this precise same Javscript worked fine with
a Java applet performing the same task as the UserControl!
Thanks a lot,
Julian
DIVs within a table. When the mouse is moved over the UserControl,
it ends up calling the following Javascript:
function Map_mouseMoved()
{
var map = document.getElementById("Map"); // the UserControl
var msg = document.getElementById("Msgbox"); // a DIV
if(map != null)
{
if (msg != null)
{
msg.innerHTML = map.getMessgage();
}
window.status = map.getMessage();
}
}
The getMessage() function returns a string which indicates the mouse
position. What I see when I run it is, when I move the mouse over the
control the text gets written to the status bar every time the mouse
moves by a pixel (OK), but the message DIV only changes when the mouse
enters or leaves the control. I know this function is being called,
so how can I force the browser to refresh the DIV?
The strange thing is, this precise same Javscript worked fine with
a Java applet performing the same task as the UserControl!
Thanks a lot,
Julian