• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

deprecated behavior

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
according to oreilly's javascript book, Document.location was deprecated in 1.1. have you experienced any problems using deprecated properties in javascript? should I just expect that in using deprecated properties I may just be wishing (more) eratic behavior on my application?
thanks. Joe
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joseph,
I dont know how it is in javascript for sure, but i bet it is like deprecated methods in java. In my experience deprecated methods almost always work just fine. I only ran into one exception where a deprecated method in an applet worked fine in IE but caused netscape to freeze(the method was suspend()).
I would however discourage using a deprecated method in new code if there is an alternative. But if you copy and paste some code containing deprecated methods, I would just test it with both browsers first.
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would strongly advise you to take no notice of the javascript standard, and to entirely ignore deprications. (unless you are a browser vendor).
I would really really love, with all my heart to see even just one vendor (I use Opera, and even that isnt perfect) to actually make an effort to implement the standard.
You really need to test each and every javascript function you intend to use, accross browsers (versions as well as vendors) yourself, as support is abritrary and bad.
This is an absolute nightmare, as you will find the same function to work *differently* on different systems, this is one of the main reasons why you should try to do as much as possible on the server (JSP servlets etc.).
James
 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sad!!!
But every word of this is true.
It has been a dream of web programmers for years to see browsers supporting same javascript, across versions; but no luck so far.
- Manish
BTW, why not use self.location? It works with IE 4+, Netscape 4.x, Netscape 6.x and also Opera. What luck man!!!

Originally posted by James Hobson:
I would strongly advise you to take no notice of the javascript standard, and to entirely ignore deprications. (unless you are a browser vendor).
I would really really love, with all my heart to see even just one vendor (I use Opera, and even that isnt perfect) to actually make an effort to implement the standard.
You really need to test each and every javascript function you intend to use, accross browsers (versions as well as vendors) yourself, as support is abritrary and bad.
This is an absolute nightmare, as you will find the same function to work *differently* on different systems, this is one of the main reasons why you should try to do as much as possible on the server (JSP servlets etc.).
James


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic