Opening a new window and not submitting

Giganews Newsgroups
Subject: Opening a new window and not submitting
Posted by:  Todd Cary (to…@aristesoftware.com)
Date: Wed, 16 Jul 2003

I want to have a link on a php page that when opened, has to be closed
in order to move on.  I have done this on pages using a button and
JavaScript as follows:

<input name="btnHelp" type="button" value="Help"
onClick="MM_openBrWindow('help.html','', 'toolbar=no, status=yes,
scrollbars=no, resizable=no, width=790, height=600')";">

When the button is clicked, the form is *NOT* submitted - this is what I
want.

However, if I use an anchor, the form is submitted.  Is there a way to
prevent this?  Here is the code I tried:

<a href="#" onClick="MM_openBrWindow('legal.php', '', 'toolbar=no,
status=yes, scrollbars=no, resizable=no, width=790, height=600')";">

When the above is executed, the page is submitted, and I do not want
that....

Todd

Replies