Re: html:link confusion
This is really a Javascript issue, but here's the problem. If you open the window in the onclick event of your anchor, you don't also want to specify an href. In straight HTML, you might do: a href=javascript:void() onclick=openWindow(url,name,features) That's why you're getting the page in the popup and in the parent window. As for parameters, the only thing you're specifying is to have scrollbars. Which is the default. You'll need to give it a little more detail if you want a window different from the default window. Something like 'height=400,width=600,scrollbars=no,resizable=yes,status=no,location=no,toolbar=no,menubar=no' Melissa [EMAIL PROTECTED] == All, I had the code below in my jsp and everything was fine. It worked like it was supposed to. html:link href=reportReceived.do name= investigationEmploymentHistoryForm property=map target=_blankview Employment History Report/html:link Then the users decide that they didn't like the fact that the new window had all the scrollbars and menus and everything on the top and so I did the next piece of code below: script language=JavaScript !-- function openWindow(theURL,winName,features) { window.open(theURL,winName,features); } //-- /script html:link href=reportReceived.do name= investigationEmploymentHistoryForm property=map onclick=openWindow ('reportReceived.do','','scrollbars=yes')view Employment History Report /html:link and it stopped working. I got the pop up without all the needed parameters as well as going to the new page in the parent window. What am I doing wrong? Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:link confusion
Just a quick suggestion but try this... onclick=JavaScript: return openWindow('reportRecei. ^^^ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 2:19 PM To: Struts Users Mailing List Subject: html:link confusion All, I had the code below in my jsp and everything was fine. It worked like it was supposed to. html:link href=reportReceived.do name= investigationEmploymentHistoryForm property=map target=_blankview Employment History Report/html:link Then the users decide that they didn't like the fact that the new window had all the scrollbars and menus and everything on the top and so I did the next piece of code below: script language=JavaScript !-- function openWindow(theURL,winName,features) { window.open(theURL,winName,features); } //-- /script html:link href=reportReceived.do name= investigationEmploymentHistoryForm property=map onclick=openWindow ('reportReceived.do','','scrollbars=yes')view Employment History Report /html:link and it stopped working. I got the pop up without all the needed parameters as well as going to the new page in the parent window. What am I doing wrong? Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:link confusion
I've also seen it done like this... a href=javascript:openWindow('wn','http://www.yahoo.com','400', '400', 'no', 'no', '0')click here/a script language=JavaScript function openWindow(name, url, width, height, resize, scroll, status) { var args; args =width= + width; args +=,height= + height; args +=,resizable= + resize; args +=,scrollbars= + scroll; args +=,status= + status; remote=window.open(url, name, args); } /script James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Melissa Shea [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 2:36 PM To: Struts Users Mailing List Subject: Re: html:link confusion This is really a Javascript issue, but here's the problem. If you open the window in the onclick event of your anchor, you don't also want to specify an href. In straight HTML, you might do: a href=javascript:void() onclick=openWindow(url,name,features) That's why you're getting the page in the popup and in the parent window. As for parameters, the only thing you're specifying is to have scrollbars. Which is the default. You'll need to give it a little more detail if you want a window different from the default window. Something like 'height=400,width=600,scrollbars=no,resizable=yes,status=no,locati on=no,toolbar=no,menubar=no' Melissa [EMAIL PROTECTED] == All, I had the code below in my jsp and everything was fine. It worked like it was supposed to. html:link href=reportReceived.do name= investigationEmploymentHistoryForm property=map target=_blankview Employment History Report/html:link Then the users decide that they didn't like the fact that the new window had all the scrollbars and menus and everything on the top and so I did the next piece of code below: script language=JavaScript !-- function openWindow(theURL,winName,features) { window.open(theURL,winName,features); } //-- /script html:link href=reportReceived.do name= investigationEmploymentHistoryForm property=map onclick=openWindow ('reportReceived.do','','scrollbars=yes')view Employment History Report /html:link and it stopped working. I got the pop up without all the needed parameters as well as going to the new page in the parent window. What am I doing wrong? Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:link confusion
I had this issue, but solved it fairly simply by using html:rewrite istead: window.open('html:rewrite href=reportReceived.do name= investigationEmploymentHistoryForm property=mapView Employment History Report/html:rewrite') It looks a bit ugly. That's why I swept all the javascript rubbish into a tile that essentially replaces the html:link tag for popups in my application. tiles:insert page=/tiles/popuplink.jsp tiles:put name=hlink html:rewrite forward=your.link name=name property=property/ /tiles:put tiles:put name=labelYour link/tiles:put tiles:put name=classsomeCSS/tiles:put /tiles:insert The generated HTML looks something like this: a class=someCSS href=javascript:void(0) onclick=window.open('yourlink.do?name=value','windowName',)Your link/a It's a lot of code for a little link, but in practical terms its cleaner and promotes reuse. The next step would be a custom tag. Actually, that sounds like fun - I might do it today! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 25 September 2002 4:19 AM To: Struts Users Mailing List Subject: html:link confusion All, I had the code below in my jsp and everything was fine. It worked like it was supposed to. html:link href=reportReceived.do name= investigationEmploymentHistoryForm property=map target=_blankview Employment History Report/html:link Then the users decide that they didn't like the fact that the new window had all the scrollbars and menus and everything on the top and so I did the next piece of code below: script language=JavaScript !-- function openWindow(theURL,winName,features) { window.open(theURL,winName,features); } //-- /script html:link href=reportReceived.do name= investigationEmploymentHistoryForm property=map onclick=openWindow ('reportReceived.do','','scrollbars=yes')view Employment History Report /html:link and it stopped working. I got the pop up without all the needed parameters as well as going to the new page in the parent window. What am I doing wrong? Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]