Krash Posted August 10, 2011 Share Posted August 10, 2011 How to get this button to open page in new window - $buttons = array( 'help' => array( 'title' => $txt['help'], 'href' => $scripturl . '?action=help', 'show' => true, 'sub_buttons' => array( ), ), Quote Link to comment Share on other sites More sharing options...
phpSensei Posted August 10, 2011 Share Posted August 10, 2011 Hi there, From my understanding, I think you want Javascript for this type of functionality. Otherwise, if you don't mind explain what you are trying to accomplish. - PHPsensei Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted August 10, 2011 Share Posted August 10, 2011 May I first point out that opening a new window is considered a bad approach to user interface design, and that applies to websites. Of course there are exceptions but in general it's best not to open things in a new window, but instead allow the user to decide when they want to open things in new windows. This article by SmashingMagazine is a really good read on this. They make a few points where it may be acceptable to open in a new window: It's a help popup. You don't want to interrupt an important process, such as filling out a form etc. It's a link to an external PDF document or something. The article goes into much more detail about it, but those are a few examples. But on to your code. This looks like code from SMF. I'm just assuming this. I don't actually think you can set it to open in a new window directly from their, but instead you'd need to do it in the template file. This, again, is another guess. Honestly I have no idea. I'd suggest asking on the SMF forums, if this is indeed SMF code. Good luck. Quote Link to comment Share on other sites More sharing options...
hannahraasch Posted August 18, 2011 Share Posted August 18, 2011 i think this is gonna be helpful to you: http://www.quirksmode.org/js/events_properties.html Do lemme know if this is not helpful. We can discuss and search it in SE and in different online tutorial as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.