...

View Full Version : the with() function



shlagish
06-20-2004, 11:18 PM
Should I be using this? or is it going to be leaved out of javascript?
I use it like so:


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...

jkd
06-21-2004, 12:49 AM
You shouldn't use the with() syntax anymore. It's deprecated and apparently costly for the interpretter. :)

shlagish
06-21-2004, 02:32 AM
ok, thank you, that's what I wanted to know :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum