[jboss-user] [JBoss Seam] - Re: Submit form and open results in new window
supernovasoftware.com
do-not-reply at jboss.com
Tue Dec 11 19:18:13 EST 2007
I use something like the following to hide the browser menus.
| <input id="index"
| onclick="javascript:openNewWindow('/start.xhtml','appwin','status=yes,resizable=yes,toolbar=no,scrollbars=yes' + winCenterCoordinates(1024,768));window.opener=null;window.close();"
| type="submit"
| value="Enter" />
|
Javascript
| function openNewWindow(URLtoOpen, windowName, windowFeatures) {
| newWindow = window.open(URLtoOpen, windowName, windowFeatures);
| }
|
| function winCenterCoordinates(w, h) {
| LeftPosition = (screen.width) ? (screen.width - w) / 2 : 0;
| TopPosition = (screen.height) ? (screen.height - h) / 2 : 0;
| position = ',top = ' +TopPosition + ',left = ' +LeftPosition + ',height = ' +h + ',width = ' +w;
| return position;
| }
|
Does anyone have any advice on opening then widow or not based on an Ajax request.
Currently I have a login form. This works normally. After successful login, the user is taken to a page with the button shown above. Here they click this button and a new window opens with the browser menus hidden.
I would prefer to give them a validation error if it fails and then open an new browser widow only if it is successful.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112122#4112122
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112122
More information about the jboss-user
mailing list