onMouseOver Event ![]()
|
Search Method Does Not Return Boolean Value According to the JavaScript documentation, the Regular Expression string search method returns either a boolean true of false value depending on a match being found. However, what is really returned is either the character position in the string where a match was found or a -1 if a match was not found. Thus, any JavaScript code expecting a boolean value return should instead use the Regular Expression string test method. Below is an example that should help illustrate this:
Regular Expression Global Flag Fails With Subsequent Usage In both Netscape 4/6, the use of the global flag in a Regular Expression causes it to fail on subsequent usage. This is not a problem with Internet Explorer 5/6. For example, /abc/gi.exec("xxabcxx") succeeds the first time it’s used but fails if the same Regular Expression is used later, e.g., /abc/gi.exec("yyabcyy"). There does not appear to be a problem with the ignore flag. A workaround is to use the Regular Expression constructor function and the compile method. This adds some overhead but it does work in all browsers. Below is an example of how this can be done.
YAMF - "Yet Another Mouse Follower" All Is Not What It Seems Netscape 6 Made Me Do It! Testing - To Reload or To Restart? Browser Sniffing - Parse or Presence? Avoiding JavaScript Errors on Earlier Browsers Stopping Annoying Auto-Scroll in DOM2 Browsers Netscape 6 is Pixel Picky Inline Style Constraint on Internet Explorer 5 Must Use <LAYER> tag in Netscape 4 to perform DHTML !DOCTYPE Compliance Mode Take Care Not to Render in <HEAD> Section Automatic Expansion of Relative URLs The Elusive Netscape 4 Layer Elements Temperamental onLoad After Reload document.images[id].complete Property Dependency Search Method Does Not Return Boolean Value Regular Expression Global Flag Fails With Subsequent Usage Conclusion Resources Downloads Roll Your Own |
onMouseOver Event ![]()
|
||||||||||
onMouseOver Event ![]()
|
onMouseOver Event ![]()
|
Copyright © 2002-2003, ProjectIt, All Rights Reserved | Last Revised: |