Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > regex help: alphanumeric with optional dashes

Reply
Thread Tools

regex help: alphanumeric with optional dashes

 
 
Dr John Stockton
Guest
Posts: n/a
 
      05-21-2005
JRS: In article <A9uje.36382$(E-Mail Removed) >,
dated Fri, 20 May 2005 23:12:32, seen in news:comp.lang.javascript,
Michael Winter <(E-Mail Removed)> posted :
>On 20/05/2005 21:33, Dr John Stockton wrote:
>
>> JRS: In article <Xns965CA8C73B70eejj99@194.109.133.242>, dated Fri, 20
>> May 2005 14:35:21, seen in news:comp.lang.javascript, Evertjan.
>> <(E-Mail Removed)> posted :

>
>[snip]
>
>> The following should be understood as a unit be any reasonable
>> newsreader :-
>>
>> <URL:http://groups-beta.google.com/groups?num=100>
>> &q=eval.is.evil&as_ugroup=comp.lang.javascript>

>
>That would be true, if you pressed Delete once more - the extra bracket
>has spoilt your demonstration. The same is true of the other URL.



Agreed, thanks. It was not possible for me to those lines that in the
article-being-edited.



I've introduced the improved code display and also CSS throughout my
site now; would some of you like to look at a few pages to see whether
they work for systems unlike mine?



Question : How should CSS and javascript document.bgColor='red'
interact? Introducing CSS

<link rel="StyleSheet" href="styles-a.css" type="text/css">

containing body { color:black; background:#FFFFCC }

stops it working in my IE4, since the timed change of background colour
is fundamental and does not occur.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
 
Reply With Quote
 
 
 
 
Michael Winter
Guest
Posts: n/a
 
      05-22-2005
On 21/05/2005 21:32, Dr John Stockton wrote:

[snip]

> I've introduced the improved code display and also CSS throughout my
> site now; would some of you like to look at a few pages to see whether
> they work for systems unlike mine?


There don't seem to be any immediate issues. If there are, I imagine
them to be limited to older user agents, and differences would be
relatively insignificant.

That said, I opened <URL:http://www.merlyn.demon.co.uk/js-randm.htm> in
NN 4.77 and, after receiving messages about missing includes, the
instance promptly closed without any messages. I didn't see any close
method calls in the vicinity.

Staying with that particular document, you have a name-only reference to
'TestBox' in the speed tests section. Gecko-based user agents don't like
that very much.

> Question : How should CSS and javascript document.bgColor='red'
> interact? [...]


I'd imagine, not very well. The usual way to override a style sheet
setting is through the style object of an element as that is considered
the highest form of specificity. You would be better off with

document.body.style.backgroundColor = 'red';

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
 
Reply With Quote
 
 
 
 
Dr John Stockton
Guest
Posts: n/a
 
      05-22-2005
JRS: In article <1n0ke.37137$(E-Mail Removed) >,
dated Sun, 22 May 2005 14:07:57, seen in news:comp.lang.javascript,
Michael Winter <(E-Mail Removed)> posted :
>On 21/05/2005 21:32, Dr John Stockton wrote:
>
>[snip]
>
>> I've introduced the improved code display and also CSS throughout my
>> site now; would some of you like to look at a few pages to see whether
>> they work for systems unlike mine?

>
>There don't seem to be any immediate issues. If there are, I imagine
>them to be limited to older user agents, and differences would be
>relatively insignificant.
>
>That said, I opened <URL:http://www.merlyn.demon.co.uk/js-randm.htm> in
>NN 4.77 and, after receiving messages about missing includes, the
>instance promptly closed without any messages. I didn't see any close
>method calls in the vicinity.


I don't close it intentionally. When I try without the include file,
there's no javascript running, it complains every time I call a function
from the include files during page load, and none of the buttons work -
which is not surprising.

I don't support Netscape 4 on the site, because I never had DynWrite
working in it, and I have no access to N4 anyway now. But that page
does not use DynWrite.


>Staying with that particular document, you have a name-only reference to
>'TestBox' in the speed tests section. Gecko-based user agents don't like
>that very much.


I take it that you mean that TestBox.value should be
document.forms["xxx"].TestBox.value ? I've dealt with that, for
TestBox and its friends. It's an error that MSIE does not see, so there
are probably still a few more like that lurking on other pages, alas.


>> Question : How should CSS and javascript document.bgColor='red'
>> interact? [...]

>
>I'd imagine, not very well. The usual way to override a style sheet
>setting is through the style object of an element as that is considered
>the highest form of specificity. You would be better off with
>
> document.body.style.backgroundColor = 'red';


Indeed I am, thanks; js-alarm.htm is the last of the more-or-less normal
pages to be CSS-upgraded, I think.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
 
Reply With Quote
 
Michael Winter
Guest
Posts: n/a
 
      05-22-2005
On 22/05/2005 21:50, Dr John Stockton wrote:

> I don't support Netscape 4 on the site [...]


And I don't necessarily suggest you do. I just took a look as NN4 can
react badly to some style sheet content. However, I'm pretty certain
that the closure isn't caused by the style sheet as it's too simple.

[snip]

> I take it that you mean that TestBox.value should be
> document.forms["xxx"].TestBox.value ?


That, or use an id with getElementById (and appropriate emulation for IE4).

> [...] It's an error that MSIE does not see, so there are probably
> still a few more like that lurking on other pages, alas.


I think I've mentioned occurrences whenever I've noticed them.

Whilst I remember: LEGEND elements (even empty ones) are required within
FIELDSET elements, and they must be the first non-whitespace content.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
 
Reply With Quote
 
Dr John Stockton
Guest
Posts: n/a
 
      05-23-2005
JRS: In article <798ke.37518$(E-Mail Removed) >,
dated Sun, 22 May 2005 22:59:15, seen in news:comp.lang.javascript,
Michael Winter <(E-Mail Removed)> posted :
>On 22/05/2005 21:50, Dr John Stockton wrote:


>> I take it that you mean that TestBox.value should be
>> document.forms["xxx"].TestBox.value ?

>
>That, or use an id with getElementById (and appropriate emulation for IE4).


DF = document.forms["xxx"]
....
with (DF) { ... }
seems the best fix; I name my elements so that "with" ambiguities are
unlikely.


>Whilst I remember: LEGEND elements (even empty ones) are required within
>FIELDSET elements, and they must be the first non-whitespace content.


Thanks. Now fixed in all the footers in the master, by substituting DIV
and adjusting TOE. I won't upload that change specifically, presuming
that the error was of little or no effect. I may change the style TOE
some more, as I don't like the result in IE4 (I suspect a bug). Short
changed page dm034-24.htm will be uploaded tonight, though; as will the
three pages which had that flaw in their "meat".

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd dashes on my home page. Paul HTML 2 06-27-2006 03:08 PM
regex debugging: alphanumeric with dashes enrique Java 2 05-19-2005 03:27 AM
Missing Dashes. Patrick D. Rockwell Computer Support 3 03-25-2005 05:36 AM
can i create a xalan java extension function where the function name has dashes (-) in it ? _clb_ Chris Bedford Java 0 08-17-2003 12:57 AM
can i create a xalan java extension function where the function name has dashes (-) in it ? _clb_ Chris Bedford XML 0 08-17-2003 12:57 AM



Advertisments