Topic: a couple of ?'s (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: Kansas, USA |
![]() I am needing some help on a couple of questions. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() Question 1: http://www.alistapart.com/stories/sizematters/ |
Nervous Wreck (II) Inmate From: Kansas, USA |
![]() 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 |
![]() 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 |
![]() It works, thanks slime. Okay there is one part of the code I do not understand. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() 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. |