Jump to content
Sign in to follow this  
fedster

open new window from menu?

Recommended Posts

fedster

Hey guys I implemented what we had discussed in http://www.pagelines.com/forum/topic.php?id=2393 and all worked well. I've realized, though, that I really need to be able to open the login page on a new window with no navigation buttons. I've seen this done via simple javascript calls such as "window.open". The issue I'm running into is that I don't think I can make any function calls from a menu item, so I'm a bit stuck. can you think of any simple way to get around this? Basically, I'd like to have a "login" entry in my primary navigation menu that opens a URL in a new window. thank you! f

Share this post


Link to post
Share on other sites
cmunns

If you made the menu with WP3.0 menus you can choose this functionality for each nav item individually by clicking the down arrow next to each item and assigning the "target" to blank

Share this post


Link to post
Share on other sites
fedster

Not sure I'm tracking you. Indeed, I did create my menu via WP3.0. When I click on the down arrow there are 3 fields: - URL - Navigation Label - Title Attribute Also, I'd like the new window to not have any of the navigation ribbon at the top. window.open in javascript will do that but I don't know of a way to do this in HTML. thanks f

Share this post


Link to post
Share on other sites
cmunns

While on the menus screen you need to reveal these options by clicking the "screen options" tab in the top right corner of the page. If you want to go the javascript route I would use jQuery which is already loaded by WP. Assign a special class to the nav item you want affected and use it in the jQuery code I can help with this if you find the code that would work

Share this post


Link to post
Share on other sites
fedster

Fascinating - did not know about screen options, I guess there are always at least 3 buttons I had not noticed on any WP screen. Ok, so that does part of the trick but not the whole trick, i.e. I'm guessing jQuery may be the way to go. So... I've assigned class AppWindowClass to the nav item I want to have a special behavior. The javascript code I'd like for it to execute is very simple, namely

window.open('myURL','windowName','fullscreen=yes, scrollbars=auto,resizable=1')

would love any help you can give me to figure out where to place this. Thank you! f

Share this post


Link to post
Share on other sites
bryan-hadaway

If these are external links, as in to other websites you could simply add the plugin: Open in New Window Thanks, Bryan

Share this post


Link to post
Share on other sites
fedster

They're not external links, unfortunately, so that won't do. Adam, is there any chance you could help me with the javascript code as you mentioned in one of your previous answers? thank you! f

Share this post


Link to post
Share on other sites
cmunns

sure, can you show me where you're getting that code from so I can see the instructions on how to use it?

Share this post


Link to post
Share on other sites
cmunns

actually I just came across this and I think it's more what you're looking for. http://wordpress.org/extend/plugins/simplemodal-login/installation/ The stylesheet for it is slightly broken but we can fix that no problem. Just create a custom nav link per the instructions on the plug-in page (use the appropriate css class and choose the no-redirect option in the plug-in settings.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×