By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,229 Members | 1,371 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,229 IT Pros & Developers. It's quick & easy.

HREF question...

P: n/a
Mel
can i specify width and height of the popup window in my href ?

something like:
<a href=xxxx width=200 height=200 target=AAA>YYYYYYYYYYY</a>

OBVIOUSLY that did not work !

thanks for your help

Mel
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <c0**********@s0b1a68.ssa.gov>, "Mel" <me*@redolive.com>
wrote:
can i specify width and height of the popup window in my href ?
Popup window?
something like:
<a href=xxxx width=200 height=200 target=AAA>YYYYYYYYYYY</a>
It is a link, more precisely an 'anchor'. If it's intention was to spawn
windows, one would have called it <window> a certain point in time.
Following the link does not necessarily result in a new window, despite
your intentions as the author. Don't forget, I, the visitor, have a will
of my own and I can decide to open it in a new tab as I often do.
However, what I now can no longer do, due to your affection with
deciding for your visitors how to surf the web, resulting in the
addition of the target attribute, is deciding to open the link _in the
same window_ that the document is in. You take away that choice.
OBVIOUSLY that did not work !


More than you may realize is not working. That needs to change before
your code does.

<http://www.useit.com/alertbox/990530.html>
<http://diveintoaccessibility.org/day_16_not_opening_new_windows.html>
<http://www.zenhaiku.com/archives/ope...indow_it_depen
ds.html>
<http://www.mentalized.net/journal/2003/03/17/a_targetbad_idea/index.asp>

Opening new windows of a certain size, regardless of whether you should,
happens by javascript. For example:

<a href="foo.html"
onclick="window.open(this.href,'pop','width=200,he ight=200'); return
false;">foo</a>

--
Kris
<kr*******@xs4all.netherlands> (nl)
<http://www.cinnamon.nl/>
Jul 20 '05 #2

P: n/a
On Tue, 10 Feb 2004 12:22:08 -0500, "Mel" <me*@redolive.com> wrote:
can i specify width and height of the popup window in my href ?

something like:
<a href=xxxx width=200 height=200 target=AAA>YYYYYYYYYYY</a>

OBVIOUSLY that did not work !


Most people around these parts dislike pop-ups - see answer from Kris. I
wouldn't go quite that far myself, but I would ask whether you have a
good reason for thinking you need a pop-up - i.e. why does the reader
need to see both the original window and the new window at the same
time? If he doesn't, then you don't need a pop-up.

If you think you do have a good reason, I have a working Javascript
example at http://www.xs4all.nl/~sbpoley/abiog/abiogen.htm which
degrades gracefully for readers without Javascript.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #3

P: n/a
Kris wrote:
However, what I now can no longer do, due to your affection with
deciding for your visitors how to surf the web, resulting in the
addition of the target attribute, is deciding to open the link _in the
same window_ that the document is in. You take away that choice.


Mozilla has a (fairly obscure, hidden) preference setting that disables
the opening of new windows via target attributes. It's been kept
obscure and hidden because it can have confusing, unpredictable effects
in sites that use odd combinations of JavaScript and targets. (I have
that set myself, and sometimes find that sites do strange things like
spawn extra windows and leave them blank while opening something in the
main browser window that really should have been in the extra window.
Entertainment sites seem to be common offenders of that variety.)

--
== Dan ==
Dan's Mail Format Site: http://mailformat.dan.info/
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.