Open new window with onMouseOver()?

admin

Administrator
Staff member
Pretty new javascripter here who really needs help.
What I磎 trying to do is have a table with different building pictures on. (Not real buildings, painted. I磎 working on a "build a little city script") What I want is that when you move your mouse over the different pictures a small window popups next to the picture with information on the building in the picture. The coding goes here: (dont mind the strange language in the coding, it is just some good ol磗wedish)

Here is the function for the popup window:

function popupwin1() {
winpopup= window.open(",'popup','height=200,width=100,menubar=no,scrollbar=no,status=no,
toolbar=no,left=300,top=150');

winpopup.document.write('<HTML>\n<HEAD>\n');
winpopup.document.write('<TITLE>Byggnads information</TITLE>\n');
winpopup.document.write('</HEAD>\n');
winpopup.document.write('<BODY>\n');
winpopup.document.bgcolor= "#F0ECC9";
winpopup.document.fgcolor= "#75746D";
winpopup.document.write('<IMG SRC=http://www.webdeveloper.com/forum/archive/index.php/"images/murhogeroverhorn.gif" HEIGHT =20 WIDTH =20><BR>
winpopup.document.write('<PRE>Muren hj鋖per till att skydda ditt land och dina
gr鰀or mot anfall</PRE>')

winpopup.document.close();
}


Here is when the window should popup:

output += '<TD BGCOLOR =#C7C4C4><input type ="image" SRC=http://www.webdeveloper.com/forum/archive/index.php/"images/huvudhus.gif" onMouseOver ="popupwin1();"></TD>';

output += '</TABLE>';
document.write(output);


Maybe you can磘 open a new window with onMouseOver(), just with onClick()? I have no idea, so all help is greatly accepted
 
Back
Top