Re: Struts - open windows without javascript
On 9/27/07, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote: > > > You could use the "target" attribute of the tag, which > > > instructs the browser to open a new window for the result > > > of the form. That's as close as you're going to get. > > > > Same goes for the link tag. The attribute you add to > > make your form/link requests open a new browser window/tab is: > > > > target="_blank" > > > > Technically, this will open a new window without javascript. > > It is just adding an HTML attribute to your form or link tags > > in your generated HTML response. No javascript required. > > One caveat on the "target" attribute: it doesn't exist in xhtml 1.1. Wow! I did not know that. Google to the rescue. Found this related information online: JavaScript window object solution: Javascript provides a partial solution to the problem by passing the href attribute to the window object's open method, and returning a value of false. The false return from the event handler prevents the web browser from following the link specified in the href attribute. http://www.TexaStar.com"; onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;">TexaStar This previous example provides an onclick event handler for those using a pointing device, and an onkeypress event handler for those using a keyboard. However, when JavaScript isn't enabled, the link is processed as normal, providing a possibly adequate fallback mechanism, but failing to produce the designer's desired result. So, it does require a small amount of javascript to make it work in an XHTML 1.1 compliant manner. This snippet above comes from the following online source: http://www.texastar.com/tips/2004/target_blank.shtml - Van -- Mike "Van" Riper [EMAIL PROTECTED] http://weblogs.java.net/blog/van_riper/ Silicon Valley Web Developer JUG https://sv-web-jug.dev.java.net JUGs International MAP http://tinyurl.com/ynktb2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts - open windows without javascript
> > You could use the "target" attribute of the tag, which > > instructs the browser to open a new window for the result > > of the form. That's as close as you're going to get. > > Same goes for the link tag. The attribute you add to > make your form/link requests open a new browser window/tab is: > > target="_blank" > > Technically, this will open a new window without javascript. > It is just adding an HTML attribute to your form or link tags > in your generated HTML response. No javascript required. One caveat on the "target" attribute: it doesn't exist in xhtml 1.1. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts - open windows without javascript
On 9/27/07, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote: > > how to open a new browser windows in Struts without to use > > javascript code in jsp page? > > Opening a new page is a client-side function. Since Struts is a > server-side system, there's no way to do this. > > You could use the "target" attribute of the tag, which > instructs the browser to open a new window for the result of the form. > That's as close as you're going to get. Same goes for the link tag. The attribute you add to make your form/link requests open a new browser window/tab is: target="_blank" Technically, this will open a new window without javascript. It is just adding an HTML attribute to your form or link tags in your generated HTML response. No javascript required. -Van -- Mike "Van" Riper [EMAIL PROTECTED] http://weblogs.java.net/blog/van_riper/ Silicon Valley Web Developer JUG https://sv-web-jug.dev.java.net JUGs International MAP http://tinyurl.com/ynktb2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts - open windows without javascript
> how to open a new browser windows in Struts without to use > javascript code in jsp page? Opening a new page is a client-side function. Since Struts is a server-side system, there's no way to do this. You could use the "target" attribute of the tag, which instructs the browser to open a new window for the result of the form. That's as close as you're going to get. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]