kaith said:
The following code used to popup a window when I used netscape 4.79.
Now I switched to mozilla 1.4
Mozilla 1.7 will be out in a few days. Mozilla 1.4 is already 1 year old.
and the window doesn't popup.
function newWindow(newContent)
{
winContent =window.open(newContent,'nextWin','screenX=0,screenY=20,width=600....);
top and left are supported by NS 7.x, Mozilla 1.x, MSIE 5+, Opera 7.x
while screenX and screenY are only supported by NS 4+ and Mozilla.
This winContent.focus() call is unneeded and illogical. You should
instead verify/test if the popup exists and is not closed and if so,
then bring it back on top.
}
....
<a href="javascript:newWindow('foo.html')"
Make sure you have javascript support enabled.
If you code that way, by resorting to the "javascript:" pseudo-protocol,
Mozilla users won't be able to use Ctrl+click on the link to open in a
tab nor use Ctrl+Enter or Middle-click to open in a new tab. They won't
be able to open the link in other ways by choosing from their context
menu since the browser no longer sees the href value as a valid href
resource.
Finally, using "javascript:" pseudo-protocol is bad for a last reason:
nothing happens if javavscript support is disabled or non-existent:
about 5%-10% of people on the web surf without javascript support enabled.
http://jibbering.com/faq/#FAQ4_24
Top Ten Web-Design Mistakes of 2002
6. JavaScript in Links
http://www.useit.com/alertbox/20021223.html
"
Don't use javascript: URLs
Using a straight http: URL will allow any browser to access the link. If
you want to use JavaScript for browsers that have JavaScript enabled,
use the onMouseOver and onClick attributes of the <a href> tag.
"
http://www.panix.com/~aahz/javascript.html#remove
DU