Re: [css-d] Div show/hide

2006-12-12 Thread Andy Pemberton
Ah, that method will work, Mark - but I would argue against using the javascript pseudo-protocol for a production site. The reason has to do with usability. Often times, embedding the javascript pseudo protocol in a link will prevent users from being able to right click and open the link in a new

Re: [css-d] Div show/hide

2006-12-12 Thread Mark J. Reed
On 12/11/06, Andy Pemberton <[EMAIL PROTECTED]> wrote: > Russ: > > Though this is more of a javascript/html dom question, I'll answer anyway. > > You must return false in the 'onclick' method of the link you're using to > fire this javascript event. This will prevent the browser from following the

Re: [css-d] Div show/hide

2006-12-12 Thread Russ Peters
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark > J. Reed > Sent: Monday, December 11, 2006 8:57 PM > To: Andy Pemberton > Cc: Russ Peters; css-d@lists.css-discuss.org > Subject: Re: [css-d] Div show/hide > > Seen th

[css-d] Div show/hide

2006-12-12 Thread Russ Peters
I'm using the following to show/hide a div when I click on a hyperlink: function ShowHideLayer(divID) { var box = document.getElementById(divID); if(box.style.display == "none" || box.style.display=="") { box.style.display = "block";

Re: [css-d] Div show/hide

2006-12-12 Thread Mark J. Reed
Seen the rant. I agree that links to content should be, at their core, plain links that would, absent JavaScript, take you to a new page with the content, said behavior then available to be modified by JavaScript to do something else, preferably without making the core behavior inaccessible even i

Re: [css-d] Div show/hide

2006-12-11 Thread Andy Pemberton
Russ: Though this is more of a javascript/html dom question, I'll answer anyway. You must return false in the 'onclick' method of the link you're using to fire this javascript event. This will prevent the browser from following the href attribute. So your markup should look like: Truth In Savin

[css-d] Div show/hide

2006-12-11 Thread Russ Peters
I'm using the following to show/hide a div when I click on a hyperlink: function ShowHideLayer(divID) { var box = document.getElementById(divID); if(box.style.display == "none" || box.style.display=="") { box.style.display = "block";