New Windows (Full Version)

All Forums >> [Web Development] >> Accessibility



Message


Raaid -> New Windows (6/3/2007 14:25:47)

Hi everyone - this is my first post so please be tolerant.

I've noticed that whilst my html code for opening a new (sized) window works fine in IE6, in IE7 the new window which I want to show sized, is simply a new tab.

For example:
- in the <head>:
<SCRIPT language="JavaScript">
<!--
function popUp(url) {
newWindow=window.open(url,'windowNew',
'width=650,height=650,status=no,toolbar=no,scrollbars=yes,menubar=no,screenX=100,screenY=0,left=100,top=0');
if (window.focus) {newwindow.focus()}
}
//--></SCRIPT>

- and in the <body>: -

<p class=intro><a href="#" onClick="popUp('email.htm')" >
<img src="images/email.gif" border=0 alt="email Me" width="160" height="40"></a></p>

Is there any way to make IE7 recognise that a popup window is required?





womble -> RE: New Windows (6/3/2007 15:05:28)

I can't say I've investigated IE7 that much - it's on my other machine for testing purposes, but I use Firefox full time and haven't done much in the way of altering the setup of IE at all. Your javascript looks okay though, and I suspect the fact it's opening in a tab is that that's how you've got IE set up on your machine - I'm presuming it's the same as FF in that in the configuration you can specify that new windows should be opened in a tab by default rather than a new window.

If that it the case, there's not much you can do about it. From an accessibility point of view, trying to override users' preferences isn't a good idea, and you need to be very careful with pop-ups and new windows. They can be very confusing to screen-reader users, and you should never have a pop-up or new window opening without some kind of warning, by using the title attribute, for example:
<p class=intro><a href="#" title="Email me - opens in a new window" onClick="popUp('email.htm')" >
<img src="images/email.gif" border=0 alt="email Me" width="160" height="40"></a></p>


I do tend to avoid javascript a lot though because of the accessibility problems it can cause, and like I said, I've not delved into IE7 that much, so someone else may come along with the answer to getting it to open a pop-up rather than a tab, but you do need to be aware of the accessibility issues.

For something like emailing (I presume email.htm is a contact form?), you really would be better including it in one of your pages rather than using a pop-up, as presumably being able to contact you is quite an important feature of the site? Your other problem is that will the pop-up work without javascript enabled? If for whatever reason the visitor's got javascript disabled or they're unable to use javascript (screenreaders don't recognise javascript), your visitors won't be able to access the email.htm page at all unless you have a backup method.




jurgen -> RE: New Windows (6/3/2007 15:06:11)

This is a user's choice and is setup with the individual browsers. The user can choose between a popup, open in a new window or NOT open at all. That's why it usualy is not a good idea to work with pop-ups.




Raaid -> RE: New Windows (6/3/2007 17:41:46)

Thank you both for your comments and advice.

Yes, my IE7 is setup for new windows to be open as tabs - I just wondered if this would be a problem.

I appreciate the limitations and unpopularity of popups as you point out, so I'm working on a presentation which avoids them.

Thanks again.






Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625