I found the solution:
<a href="#" onclick="doReset();"><img src="/cs/images/button_reset.gif"
width="70" height="46" border=0></a>
> type=image results in a submit button - not a button. Thats why.
> /Peter
>
>
> ----- Original Message -----
> From: "Jeff McFarland" <jeff@s...>
> To: "JavaScript HowTo" <javascript_howto@p...>
> Sent: Wednesday, January 23, 2002 3:16 PM
> Subject: [javascript_howto] RE: Redirect Using JS
>
>
> > Ok... the cancel does work, but my problem is that I am using an
> > type=image and then the code below doesn't work. But, when I replace
> > type=image to type=button, it all works fine. So, I guess the real
> > question should be why doesn't the code with with a type=image?
> >
> > Thx,
> >
> > Jeff
> >
> > > Hi,
> > >
> > > That code almost works. The only problem is that when you use the
code
> > > below and click "Cancel" on the alert dialogue box, it still
redirects
> > > instead of simply cancelling the whole reset option.
> > >
> > > Thx,
> > >
> > > Jeff
> > >
> > > > or try
> > > > document.location.href='reset.asp';
> > > > ----- Original Message -----
> > > > From: "Roaniver Madrid" <roan.madrid@a...>
> > > > To: "JavaScript HowTo" <javascript_howto@p...>
> > > > Sent: Tuesday, January 22, 2002 5:31 PM
> > > > Subject: [javascript_howto] RE: Redirect Using JS
> > > >
> > > >
> > > > > Hi Jeff,
> > > > >
> > > > > Try this:
> > > > > window.location.href = 'reset.asp';
> > > > >
> > > > > -----Original Message-----
> > > > > From: Jeff McFarland [mailto:jeff@s...]
> > > > > Sent: Tuesday, January 22, 2002 8:46 PM
> > > > > To: JavaScript HowTo
> > > > > Subject: [javascript_howto] Redirect Using JS
> > > > >
> > > > >
> > > > > What's up everyone...
> > > > >
> > > > > This is what I need help with. When someone clicks the "reset"
> > button
> > > on
> > > > > my form, they get an alert that says "You are about to reset your
> > > form"...
> > > > > and if the click cancel... nothing happens, but if they click OK,
> > the
> > > just
> > > > > will forward to a reset.asp.
> > > > >
> > > > > Here is what I have, but it doesn't work:
> > > > >
> > > > > function doReset()
> > > > > {
> > > > > if (window.confirm("Are you sure you want to reset this
form?"))
> {
> > > > > window.navigate='reset.asp';
> > > > > }
> > > > > }
> > > > >
> > > > > </Script>
> > > > >
> > > > > Do you guys have any ideas?
> > > > >
> > > > > Thx
> > > > > $subst('Email.Unsub').
> > > > >
> > > > >
> > > > $subst('Email.Unsub').
> > > >
> >
> $subst('Email.Unsub').
>