Re: Space in REGEX in IE6
- From: Captain Paralytic <paul_lautman@xxxxxxxxx>
- Date: 10 May 2007 09:05:29 -0700
On 10 May, 15:06, Duncan Booth <duncan.bo...@xxxxxxxxxxxxxxx> wrote:
Captain Paralytic <paul_laut...@xxxxxxxxx> wrote:
On 9 May, 23:00, Lee <REM0VElbspamt...@xxxxxxx> wrote:
Try the following in IE6. It works for me in IE7 and Firefox:
<html>
<body>
<script type="text/javascript">
alert("Hello there, world".replace(/ /g,''));
</script>
</body>
</html>
--
It works in IE7 and Firefox, but fails in IE6
Fails how?
It works in a completely clean IE6 installation (tested using Microsoft
Virtual PC and Microsoft's own IE6 XP image, copy/pasting the exact text
Lee posted).- Hide quoted text -
- Show quoted text -
I think you have misread the conversation!
I said, that I had an error and I specified that error as "Expected
')'"
Lee posted asking "Does it work in other browsers?".
I answered this question by saying that "It works in IE7 and Firefox,
but fails in IE6"
You then said "Fails how?"
I now refer you back to my first post where I said "However in IE6 it
complained with an "Expected ')'" error.", which answers you question
of "Fails how?", before you even asked it! Phew!!
Lee's suspicion was a problem elsewhere in my code. However it all
works fine in both IE7 and FF. If I replace
element.value = element.value.replace(/ /g,'');
with
element.value = element.value.replace(/\s/g,'');
then the error goes away.
.
- Follow-Ups:
- Re: Space in REGEX in IE6
- From: Duncan Booth
- Re: Space in REGEX in IE6
- References:
- Re: Space in REGEX in IE6
- From: Captain Paralytic
- Re: Space in REGEX in IE6
- From: Duncan Booth
- Re: Space in REGEX in IE6
- Prev by Date: Re: Change the color of an "a" child element inside a cell ?
- Next by Date: Re: Sorting div contents using javascript
- Previous by thread: Re: Space in REGEX in IE6
- Next by thread: Re: Space in REGEX in IE6
- Index(es):
Relevant Pages
|