CSS popup window
Posted: Sun, 2005-07-03 18:03
I'm looking into ways of creating a popu window without Javascript. I looked at Eric Meyer's pure popup css, that shows a "popup" on hover. But is there any way of showing a popup window when a link is clicked?
I don't want a traditional Javascript popup window, but simply something that popups next to the news item (in this case) that is clicked. Something similar to the Javascript popup window in this calendar:
www.dynarch.com/projects/calendar
It's often irritating with Javascript popups, they need to be clicked to be closed and some people have turned off Javascript in their browsers.
I'd like it implemented on this page: http://www.oppnakanalen.se/vaxjo/ny-default.asp
Any tips?


Guru
Posts: 9199
Joined: 2004-06-30
Location: Milton Keynes
CSS popup window
Posted: Sun, 2005-07-03 18:28
There is the :active link state, which is when the link has been clicked. Maybe you could use this to display the popup?
Guru
Posts: 29
Joined:
Location: ewn
CSS popup window
Posted: Sun, 2005-07-03 18:31
Or you could just go ahead and use the DOM for behavior.
Regular
Posts: 47
Joined: 2005-07-02
CSS popup window
Posted: Sun, 2005-07-03 19:53
Oh, that was a difficult one. DOM? I know from Googling that is stands for Document Object Model, but that's about it. Doesn't it mean I'm still using Javascript and DHTML?
Guru
Posts: 2983
Joined: 2004-09-01
Location: MA, USA
CSS popup window
Posted: Sun, 2005-07-03 20:06
Yes, but that's what it's for. Have you looked into iframe?
Guru
Posts: 29
Joined:
Location: ewn
CSS popup window
Posted: Mon, 2005-07-04 02:44
Use XHTML for markup.
Use CSS for layout.
Use DOM for behavior.
Don't use XHTML for layout.
Don't use CSS for behavior (although some may argue that :hover is behavior but that is debatable).
It is a cool exercise to try the eric meyer method but javascript and the DOM is there for a reason and this is it.
:)
Regular
Posts: 47
Joined: 2005-07-02
CSS popup window
Posted: Mon, 2005-07-04 06:54
Ok, I'll go for DOM then and try to learn how to create a popup that is connected to the current window and isn't opening in it's own independent window (iframe?). Only that it might leave out some users with Javascript disabled.
Or do you have any other idea how to show more information about a news item when the news heading is clicked?
I might instead make a page that shows news details in the main box and the latest news headings in the right box. The problem might be that there's no space in the main menu for another heading, as there's currently no heading for News. I might solve it by creating a "back" link in the right column together with the news headings.
But all this might be difficult to grasp if you don't read Swedish, which is the language of the page...
Thanks for all the advice!
Guru
Posts: 9199
Joined: 2004-06-30
Location: Milton Keynes
CSS popup window
Posted: Mon, 2005-07-04 08:06
Yes, go to a page with the news story on :roll: