Re: [WSG] Javascript problem

2007-06-22 Thread Paul Collins
Thanks for your replies everyone, much appreciated. All working well now. Cheers Paul On 21/06/07, Thierry Koblentz <[EMAIL PROTECTED]> wrote: > On Behalf Of Paul Collins > I have a script that adds colours to a all the columns in a table. It > works fine, the only problem is, it is trying to

RE: [WSG] Javascript problem

2007-06-21 Thread Thierry Koblentz
> On Behalf Of Paul Collins > I have a script that adds colours to a all the columns in a table. It > works fine, the only problem is, it is trying to apply the code to all > pages, when the table is only on a couple. So when I am viewing all > other pages, it comes up with this error: > > docu

Re: [WSG] Javascript problem

2007-06-21 Thread Dan Dorman
On 6/21/07, Dan Dorman <[EMAIL PROTECTED]> wrote: function alternateRows(tableID,numberOfColors,colorArray){ [snipped] if (table) { var trs=document.getElementById(tableID).getElementsByTagName("TD"); [snipped] } } } Whoops! I got a little careless. The line starting with "v

Re: [WSG] Javascript problem

2007-06-21 Thread Matthew Pennell
On 21/06/07, Paul Collins <[EMAIL PROTECTED]> wrote: So, what I would like to do, is add a checker to the script to see if the table actually exists before doing the rest of the code. Unfortunately, I am a novice to this and I've been stuffing around for a while and can't get it to work. Simp

RE: [WSG] Javascript problem

2007-06-21 Thread Peter Leing
Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Collins Sent: Thursday, June 21, 2007 1:57 PM To: wsg@webstandardsgroup.org Subject: [WSG] Javascript problem Hi all, I hope this is on topic, please ignore it if not, I have a small Jscript problem that shoul

Re: [WSG] Javascript problem

2007-06-21 Thread Dan Dorman
On 6/21/07, Paul Collins <[EMAIL PROTECTED]> wrote: I hope this is on topic, please ignore it if not, I have a small Jscript problem that shouldn't be hard to sort out, but I am not great with these things... I'm assuming from the subject that you're actually referring to Javascript. Jscript is

[WSG] Javascript problem

2007-06-21 Thread Paul Collins
Hi all, I hope this is on topic, please ignore it if not, I have a small Jscript problem that shouldn't be hard to sort out, but I am not great with these things... I have a script that adds colours to a all the columns in a table. It works fine, the only problem is, it is trying to apply the c

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-13 Thread Jan Brasna
Don't popup blockers allow them when they're a result of a direct user interaction Sometimes, sometimes not. It all depends on browser and/or setup... Or is this another thing that XP SP2 messes up? I'd guess so... -- Jan Brasna aka JohnyB :: www.alphanumeric.cz | www.janbrasna.com **

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-13 Thread Patrick H. Lauke
Jan Brasna wrote: javascript may fail to open a new window? Popup blockers etc. Don't popup blockers allow them when they're a result of a direct user interaction (such as clicking a link)? Or is this another thing that XP SP2 messes up? -- Patrick H. Lauke _

RE: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-13 Thread Mike Pepper
Patrick H. Lauke wrote: > so what advantage does this bring? If javascript is enabled, but fails > to open a window, the link still works? What are the situations in which > javascript may fail to open a new window? > Jan Brasna wrote: > > Do not return false. Return !window.open(...) instead.

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-13 Thread Jan Brasna
javascript may fail to open a new window? Popup blockers etc. -- Jan Brasna aka JohnyB :: www.alphanumeric.cz | www.janbrasna.com ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for so

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-13 Thread Patrick H. Lauke
Jan Brasna wrote: Do not return false. Return !window.open(...) instead. so what advantage does this bring? If javascript is enabled, but fails to open a window, the link still works? What are the situations in which javascript may fail to open a new window? -- Patrick H. Lauke _

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-13 Thread Jan Brasna
return false; Do not return false. Return !window.open(...) instead. -- Jan Brasna aka JohnyB :: www.alphanumeric.cz | www.janbrasna.com ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-13 Thread Thorsten
guys, thanks a lot for helping out :^) -- Thorsten ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Ben Curtis
and don't use inline scripts. They are as bad as inline styles: Barkow-Lewinsky, Eva var links = document.getElementsByTagName('a'); for(i=0;i This would be better, in case you have multiple classes assigned to your a tag: if (links[i].className.match(/\bpopup\b/)) Better than class, t

Re: Re[2]: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Kornel Lesinski
On Fri, 11 Mar 2005 18:22:25 -, Chris Dawes <[EMAIL PROTECTED]> wrote: Never put URLs in onclick (javascript:blabla *is* URL) Forget that use this idea: That is tweaked non-standard accessibility killer. It will break even if I middle-click link in a normal browser... In my previous post I've

Re[2]: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Chris Dawes
> Never put URLs in onclick (_javascript_:blabla *is* URL) Forget that use this idea: if you have to open more than one window use a function to call the open window functions one after the other: openWindow(params) openWindow(params) hmmm... might be better than returning false from a f

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Kornel Lesinski
On Fri, 11 Mar 2005 11:49:57 -, Thorsten <[EMAIL PROTECTED]> wrote: Barkow-Lewinsky, Eva Never put URLs in onclick (javascript:blabla *is* URL) Don't use href="#". Put meaningful link there, and avoid duplication by using this.href. Second attribute for window.open is window name and works l

[WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Thorsten
hiya, i'm not sure if this is the right place to pose my question, but i'll dare it. if my question is unwanted on the list, i apologise, maybe someone can reply in private? i have a page from which i'd like to pop-up a window with more details upon clicking a hyperlink. the javascript i'm usin