You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by JOEL VOGT <jo...@studentmail.newcastle.edu.au> on 2001/04/04 14:26:18 UTC
Javascript and struts
Hi all,
I have a simple login form. When the user clicks the submit button, I
want to open up a new window using javascript. This window will have no
back button etc for the user to play around with.
This works fine, I get my window okay and it displays properly, the
problem is it still displays a duplicate in the original browser window?
Does anyone know how to stop this?
Thanks, Joel.
Re: Javascript and struts
Posted by kreimer <kr...@bbs.frc.utn.edu.ar>.
return false in the event handler js code:
<input type="submit" value"ok" onclick=".............
window.open();
..........
............. return(false);">
> Hi all,
>
> I have a simple login form. When the user clicks the submit button, I
> want to open up a new window using javascript. This window will have no
> back button etc for the user to play around with.
> This works fine, I get my window okay and it displays properly, the
> problem is it still displays a duplicate in the original browser window?
> Does anyone know how to stop this?
>
> Thanks, Joel.
Re: Javascript and struts
Posted by Jens Rehpöhler <je...@rehpoehler.de>.
Hi Joel,
only to make sure I understand you correct: You use in you page
<input type="submit" name="foo" value="submit" onClick="openNewWindow();">
In the openNewWindow() function you call "form.submit()"?
If the above is correct you can try two things:
1. add a "return false;" to your openNewWindow() function.
2. change the type from "submit" to "button".
Hope that helps;
Jens
JOEL VOGT wrote:
> Hi all,
>
> I have a simple login form. When the user clicks the submit button, I
> want to open up a new window using javascript. This window will have no
> back button etc for the user to play around with.
> This works fine, I get my window okay and it displays properly, the
> problem is it still displays a duplicate in the original browser window?
> Does anyone know how to stop this?
>
> Thanks, Joel.
--
Jens Rehpöhler
Tel: 0172-5277655 * eMail: jens@rehpoehler.de
_______________________________________________
rehpoehler - WebDesign & Software-Entwicklung
Meisenweg 4
33335 Gütersloh
http://www.rehpoehler.de