pop up windows

I have tried the following two codes to get a pop up window that will display a definition. I have two examples with a question for each below.  Thanks for your help!
-----------------------------------
My problem in example #1 below is that the alert box (pop up window) plays a sound (alert sound) on the Mac Computers who view it.  

QUESTION:
What can I add to the code so users don't hear the sound
and
How can I define the size and location of the alert window (or is that not possible)
------------------------------------
Example#1

<CENTER><FORM><INPUT TYPE="button" Value=" Software  "
           onClick="alert('This is my definition of the work "software"')")>
      </TD>
-------------------------------
My problem in example #2 below is that the pop up window does not stay on the top (forefront).  If someone double clicks the button then the pop up window can't be seen as it is behind the main window.  Also if the user clicks anywhere on the main window after a pop-up window is displayed the pop up goes to the background and when the user clicks on other "pop up window buttons" the pop up window does not come to the foreground unless it had been closed.  

QUESTION:
What can I add to the code so users will always get the pop up window in the foreground even if the previous window is lurking in the background.

------------------------------------
-------------------------------
Example#2

      <TD>
         <CENTER><FORM ACTION="" METHOD=POST name=myform>
            <P><INPUT TYPE=button NAME=Button1 VALUE="      Hardware      " onclick="window.open ('descript/hardware.htm', 'newWin', 'scrollbars=no,status=no,width=200,height=200')">
         </FORM></CENTER>
      </TD>
---------------------------
I would like my solution to work on 3.O browsers and above (it would be great to work on 2.0 and above
-------------------------------
-------------------------------
calleyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sybeCommented:
put this in the html code for the popup window
<body ... onLoad="this.focus()">
0
calleyAuthor Commented:
sybe,

Please give me more direction on where to add your code:

put this in the html code for the popup window
    <body ... onLoad="this.focus()">

---------------------
Where does that go in the following code:

<FORM ACTION="" METHOD=POST name=myform>
                <P><INPUT TYPE=button NAME=Button1 VALUE="      Hardware      "
    onclick="window.open ('descript/hardware.htm', 'newWin',
    'scrollbars=no,status=no,width=200,height=200')">
             </FORM>
0
btphelpsCommented:
Focus() is not supported by IE.

Brian
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

btphelpsCommented:
Focus() is not supported by IE.

Brian
0
Michel PlungjanIT ExpertCommented:
1. Alerts play sounds - that is what they are made for

2. you second example is ok, you need to put the following in the
descript/hardware.htm file:

<HTML>
<HEAD>
<TITLE>hardware<TITLE>
</HEAD>
<BODY ONLOAD="if (self.focus) self.focus(); else alert('Hardware');>

Here is all you ever wanted to know about hardware
</BODY>
</HTML>

The construction above will bring the window to front in NS2.x and up and MSIE 3.x and up

0
calleyAuthor Commented:
I added the code suggested by mplungjan and got a syntax error.
---------------

Let me explain my problem more specifically and post the html files in question below.  Please load these files and try your solution out.  I would like the solution to work on Netscape 3.0 and above (Netscape 2.0 and above would be even better along with it working on IE 3.0 or above):

I have a main file (called start.htm) with 3 java buttons.  Each button take the user to a pop up window when clicked.  

The problem is that the pop up window does not stay on the top (forefront) after it first appears if at all.  If someone double clicks the button then the pop up window can't be seen as it is behind the main window (the second click does that).  Also if the user clicks anywhere else on the main window after a pop-up window is displayed, the pop up goes to the background and when the user clicks on other "pop up window buttons" the pop up window does not come to the foreground unless it had been closed.  

    QUESTION:
What can I add to the code so users will always get the pop up window in the foreground even if the previous window is lurking in the background or when the user clicks somewhere on the main winddow the pop up window does not go to the background?

Here are two files that will provide you with what you need to test your solution.  Thank you!

start.htm
--------------
<HTML>
<HEAD>
   <TITLE>Educational Resource Start Page</TITLE>
   <META NAME=GENERATOR CONTENT="Claris Home Page 3.0">
   <X-CLARIS-WINDOW TOP=42 BOTTOM=477 LEFT=4 RIGHT=534>
   <X-CLARIS-TAGVIEW MODE=minimal>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER><FONT SIZE="+2" COLOR="#FF0000"><B>Start
Page</B></FONT><TABLE BORDER=0 HEIGHT=128>
   <TR>
      <TD COLSPAN=3>
         <CENTER>Here are the categories to choose from:</CENTER>
      </TD>
   </TR>
   <TR>
      <TD>
         <P><FORM ACTION="" METHOD=POST name=myform>
            <CENTER><INPUT TYPE=button NAME=Button1 VALUE=" Software  " onclick="window.open ('software.htm', 'newWin', 'scrollbars=no,status=no,width=200,height=100')"></CENTER>
         </FORM></P>
      </TD>
      <TD>
         <P><FORM ACTION="" METHOD=POST name=myform>
            <CENTER><INPUT TYPE=button NAME=Button1 VALUE="      Hardware      " onclick="window.open ('hardware.htm', 'newWin', 'scrollbars=no,status=no,width=200,height=200')"></CENTER>
         </FORM></P>
      </TD>
      <TD>
         <P><FORM ACTION="" METHOD=POST name=myform>
            <CENTER><INPUT TYPE=button NAME=Button1 VALUE="Research" onclick="window.open ('research.htm', 'newWin', 'scrollbars=no,status=no,width=200,height=200')"></CENTER>
         </FORM></P>
      </TD>
   </TR>
 
</TABLE>
</CENTER>
</BODY>
</HTML>
------------
------------

hardware.htm
-----------
<HTML>
<HEAD>
   <TITLE>Hardware Description</TITLE>
   <META NAME=GENERATOR CONTENT="Claris Home Page 3.0">
   <X-CLARIS-WINDOW TOP=66 BOTTOM=480 LEFT=8 RIGHT=538>
   <X-CLARIS-TAGVIEW MODE=minimal>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<P><FONT SIZE="+1">Great hardware technology tools for educators:
Computers, PDA's, Printers, Scanners, Digital Cameras, modems,
etc.</FONT></P>

<P><FORM ACTION="" METHOD=POST>
   <CENTER><INPUT TYPE=button NAME=Button VALUE="Close" onclick="self.close()"></CENTER>
</FORM></P>
</BODY>
</HTML>
---------------

Thanks again!!


0
Michel PlungjanIT ExpertCommented:
<BODY ONLOAD="if (self.focus) self.focus(); else alert('Hardware');">

Sorry I forgot a closing quote after alert('Hardware');"  

Michel
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
calleyAuthor Commented:
Thank you!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Internet Marketing

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.