Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,990
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts

    Variable names with _ character

    I have a script which has worked fine until recently, but as far as I can make out is not working properly in Netscape 6 or possibly Netscape 7. The only thing I can see which MIGHT cause this is that some variable names include an underscore character, e.g. first_name. There is no CSS involved.

    Any comments, please? Has Netscape 6 any glitches of this kind?
    Is Netscpe 6 or 7 supplied to aol users instead of MSIE?
    Last edited by Philip M; 01-11-2003 at 09:01 PM.

  • #2
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For the first part, I'd ask that you either post the script, or post a URL to the script (personally, I'd prefer the latter).

    For the second part, IE is the rendering engine for all Windows versions of AOL, as well as earlier versions for Mac OS 9 and earlier. However, AOL 7.0 for Mac OS X has the Gecko rendering engine -- the same version as Netscape 7.0.

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,990
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    Thanks, Skyzyx. Obliged for the information.

    Another possible source of the problem -

    I know that Javascipt is case sensitive, yet onFocus works as does onfocus, and I have often seen onblur & OnBlur, onload & onLoad etc. apparantly used interchangeably. Is this in fact correct?

    Is there in fact any reason why onFocus might not work in certain browsers where onfocus does work?

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Philip,

    onFocus or onfocus, etc. shouldn't matter, as that's HTML, not JavaScript. HTML is NOT case-sensitive (unless you're talking about XHTML, which as far as I know still isn't case-sensitive unless you want to validate it, or you're concerned about coding to standards, which IMHO everyone should be).

    The problem must lie elsewhere.

    JavaScript is indeed case-sensitive, though... so any references to functions, variables, etc. must be in the same case, and this also applies to any references to form variables, since they become part of the Document Object Model (DOM).

    FYI, variable names with underscores (i.e. my_form) in them shouldn't matter at all, as long as they are referenced correctly.

    Obviously the problem lies elsewhere, as I stated above - do you have a URL or code as an example, and perhaps a copy of the error message?
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #5
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,990
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    Thanks a million, Whammy!

    You are right - I have discovered that the problem lies elsewhere, with a particularly subtle coding imperfection which enabled some oh-so-clever users to circumvent the form validation.

    Problem solved! Long live Whammy and CodingForums!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •