473,796 Members | 2,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

? kills IE Mac

I have a script with a regex

var re = /\/(\w+?)\//;

In IE5 Mac, that kills all javascript, anywhere on the page. No errors
but no functionality at all. Just the mere presence of that line without
it being called.

removing the "?", returns everything normal.

var re = /\/(\w+)\//;

Why could that be?

Is the default regex behaviour non greedy and the "?" really uneeded?

Cheers,
Jeff
Jul 23 '05 #1
2 1092
On Sat, 25 Dec 2004 00:07:22 GMT, Jeff Thies <je**@spamalana dingong.com>
wrote:
I have a script with a regex

var re = /\/(\w+?)\//;

In IE5 Mac, that kills all javascript, anywhere on the page.
As I understand it, versions of IE prior to 6 don't support non-greedy
matching. Microsoft's documentation isn't specific about this and I don't
have access to earlier versions, so I could be wrong.

[snip]
Is the default regex behaviour non greedy and the "?" really uneeded?


The default is greedy matching, but it doesn't matter here. The two
slashes can't be matched as part of the \w character class.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #2


Jeff Thies wrote:
I have a script with a regex

var re = /\/(\w+?)\//;

In IE5 Mac, that kills all javascript, anywhere on the page. No errors
but no functionality at all. Just the mere presence of that line without
it being called.

removing the "?", returns everything normal. Why could that be?


Browsers implemented regular expressions in JavaScript before the
ECMAScript edition 3 standardized them so in browsers like Netscape 4 or
IE 5/Mac or IE 5/Windows (in the standard installation, on Windows it is
possible to update the JScript engine without changin the IE version)
you find regular expression support but not with all the features
standardized in ECMAScript edition 3. The non-greedy matching with '?'
placed after a quantifier is one of the features that those older
browsers do not support so IE 5/Mac probably chokes on that regular
expression syntax and that way stops executing the script. That it kills
all JavaScript sounds unlikely, if there are several <script> blocks in
a page an error in one should not kill execution of the other script
blocks. But I am not too familiar with IE 5 on the Mac.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1841
by: Phil Powell | last post by:
I have a very simple mySqlQuery object that takes two parameters: 1) the string query 2) the db connection resource I tested and was certain everything is passing correctly (the string query and the db connection resource). The first mySqlQuery object produces just fine; but when I run it, the second mySqlQuery object (a totally different SQL query, same db connection resource) comes back null every time, even when there is data...
4
2554
by: ryan | last post by:
Hello and sorry for the crosspost, I have a php page that uses sessions. The page has a button that opens a popup window. The popup window is itself a php page and also uses the session. When I close the popup, I lose the session. Is there anyway I can prevent the session from being dropped? Thanks! ~ryan
0
985
by: Gene Heskett | last post by:
Greetings list; I posted a snippet about 36 hours ago, and no one has commented or offered to help. So I'll post just the revelant piece again. OS=linux-2.6.8-rc1-mm1 in a 1400mhz athlon # python Python 2.2.3 (#1, Oct 15 2003, 23:33:35) on linux2
0
1377
by: Scott Carter | last post by:
I've got an app that contains a couple of Crystal Reports. The reports are working, but everytime I execute the code to show the reports in the debugger it kills VS.Net 2003. As it's dying, there's a command window with something about a MiniDump and there are a couple of entries in my event log (see below). I'm working on XP Pro. Here are the event log messages: -------------------------------------------- Faulting application...
1
1733
by: Stefan Erl | last post by:
Hello I've written a javascript html editor using an iFrame with designmode switched on in combination with a php script to save the data on the server. When I try to open the saved file in the editor again, he removes all images. On my local apache server it works fine, so the problem isn't caused by the php script.
2
2070
by: kaeli | last post by:
Okay, trying to get the for...in loop syntax and obviously doing something wrong. I have a form and a select with options. The explicit indexing I usually use works fine and alerts all the values. The for...in loop gives undefined for both IE and NN, but for IE, kills it with way too many alerts. NN6 gives the right number of alerts (5 options, 5 alerts) but all say undefined. Anyone know what I did wrong? AFAIK, selectElement.options...
0
967
by: Bruce | last post by:
Hi, I am using the eval provider code described in http://www.eggheadcafe.com/articles/20030908.asp and while it works fine it kills the session object and when the page is posted back it has IsNewSession = true. I use it to evaluate small code elements in xml file used to describe a form which is rendered through xsl to asp: type code and then to ParseControl which returns a control then place into a placeholder. The code eval is done
1
1188
by: Support | last post by:
Hello: I have an application that I wish to update upon login via login script but since the application is in the start-up menu, I cannot override the exe, so, I wrote a function that iterates through all the instances of this application and kills the one instance that is not itself and then shuts itself down. The idea is that in a batch file , I could run <applicationname> shutdown which would create a new instance of the...
0
1385
by: Paul Lautman | last post by:
Last night I had a web site. This morning it was returning nothing. I traced it to a call to setlocale(). It appears that something has happened that means that any call to setlocale completely kills the site, including dumping anything that is in the output buffer. Take a look at http://www.osg-uk.com/st.php and http://www.osg-uk.com/sts.php the contents of which are shown below. Anyone got any ideas? st.php:
0
10455
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10228
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10173
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10006
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7547
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.