View Single Post
Old 09-05-2012, 12:05 AM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,248
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
As your code is written, you would be callling
Code:
remove(layer1)
There is no variable by that name, so when you end up doing
Code:
   alert(removeId)
you will either be doing the equivalent of alert(null) or, esp. in MSIE browsers, alert( the_object_with_the_id_of_layer1 ) (because MSIE treats IDs as object references if you don't override that meaning).
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
nikko50 (09-05-2012)