I just discovered that if you use target = _blank for your menu item then the link will use javascript window.open, AKA a pop-up, which will most likely get blocked. Why on earth is this being done? Is there an option to stick with the old target="_blank"
instead?
The target attribute is not in the XHTML 1.1 spec from the W3. Since the adapter strive for the strictest compliance, the choce was made (by me) to avoid that attribute in favor of the solution using onclick and onkeypress that you observed. Are you certain
that popup blockers are ready twarting this? I use this solution all the time and it seems to work wonderfully. Maybe I'm missing something. Do you have a recipe that I could follow to reproduce an actual problem?
When I include target="_blank" in the MenuItem, the output includes onclick="window.open(this.href,'_blank',")
My client was complaining that some of her customers could not open the link. I discovered that in IE7, if your
Pop-Up Blocker settings were set to High (block all pop-ups) then this was treated as a pop-up and blocked. I suspect that they had modified their filter settings to high. When set to Med or Low, this is not a problem.
Member
66 Points
151 Posts
CSSFriendly menu uses pop-up for target=_blank
Aug 31, 2007 11:35 AM|cecook05|LINK
I just discovered that if you use target = _blank for your menu item then the link will use javascript window.open, AKA a pop-up, which will most likely get blocked. Why on earth is this being done? Is there an option to stick with the old target="_blank" instead?
Member
290 Points
741 Posts
Re: CSSFriendly menu uses pop-up for target=_blank
Sep 01, 2007 03:39 AM|Russ Helfand|LINK
The target attribute is not in the XHTML 1.1 spec from the W3. Since the adapter strive for the strictest compliance, the choce was made (by me) to avoid that attribute in favor of the solution using onclick and onkeypress that you observed. Are you certain that popup blockers are ready twarting this? I use this solution all the time and it seems to work wonderfully. Maybe I'm missing something. Do you have a recipe that I could follow to reproduce an actual problem?
Groovybits.com
Member
66 Points
151 Posts
Re: CSSFriendly menu uses pop-up for target=_blank
Sep 05, 2007 03:14 PM|cecook05|LINK
When I include target="_blank" in the MenuItem, the output includes onclick="window.open(this.href,'_blank',")
My client was complaining that some of her customers could not open the link. I discovered that in IE7, if your Pop-Up Blocker settings were set to High (block all pop-ups) then this was treated as a pop-up and blocked. I suspect that they had modified their filter settings to high. When set to Med or Low, this is not a problem.
This code: