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 3 of 3
  1. #1
    Senior Coder
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1,063
    Thanks
    2
    Thanked 0 Times in 0 Posts

    the with() function

    Should I be using this? or is it going to be leaved out of javascript?
    I use it like so:
    Code:
     with(tooltip.style){
     left=Xpos+"px";
     top=Ypos+"px";
     display="block";
     }
    and jslint says:
    Expected an identifier and instead saw 'with'.
    Is with() depricated or something?

    btw, I tried searching mozilla.org, google and these forums, but it's hard since all of these search engines take out the word with because it is too common...
    Shawn

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    You shouldn't use the with() syntax anymore. It's deprecated and apparently costly for the interpretter.

  • #3
    Senior Coder
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1,063
    Thanks
    2
    Thanked 0 Times in 0 Posts
    ok, thank you, that's what I wanted to know
    Shawn


  •  

    Posting Permissions

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