Topic: a couple of ?'s |
|
---|---|
Author | Thread |
Nervous Wreck (II) Inmate From: Kansas, USA |
posted 02-20-2003 21:49
I am needing some help on a couple of questions. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-20-2003 22:17
Question 1: http://www.alistapart.com/stories/sizematters/ |
Nervous Wreck (II) Inmate From: Kansas, USA |
posted 02-20-2003 22:35
Thanks for the link about the font size (cute title). It seems getting this font thing squared away is going to take quite a bit of thinking on my part. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-21-2003 00:30
The best way to open a new window, actually, is not to use the javascript: protocall. It's best to use the href attribute normally, and add an onclick attribute to handle the window opening. That way, users without javascript enabled will still be able to reach the page linked to. So I would suggest this code: |
Nervous Wreck (II) Inmate From: Kansas, USA |
posted 02-21-2003 01:31
It works, thanks slime. Okay there is one part of the code I do not understand. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-21-2003 01:46
I merely took the first argument to window.open, which was 'sterling575.html', and replaced it with this.href. The keyword "this" refers to the object that the onclick event is inside - the <a> tag. the .href part gets the "href" property of that object, which happens to be what's inside the href="...". This makes it so that you can change the href property of the <a> tag, and the window.open will still work correctly with the changed href. |