I need some help with JavaScript stuffs. Most of my life I made compiled software(C,C++,VB,etc.) but in past 2 months start developing of online application with PHP and ajax platform called phpLiveX. Whole develop time I used google chrome to test this app and everything works just fine, after finishing and before going public, last step is to check how everything works in other browsers.
Results are (percentage working fine):
- Chorme:
100%
- Opera:
开发者_StackOverflow100%
- Safari:
100%
- FireFox 3, 4:
90%
- IE 7, 8:
30%
I found that this is common problem, but like I said, since i don't have too much experience with JavaScript I don't know exactly where from to start? Mostly functions that executing fail are very ordinary functions for displaying results (ajax) or simple works with user interface (on click disable enable buttons, or on click fire ajax execution etc)
So what is best "procedure" start debugging every function that fail in every browser one by one, or are there some common places and stuffs that I need to check first, or something else?
Please give me your advices. Thanks!
Better you use JS framework like jQuery, mootools, which allows developers to write single code for multiple browsers, And internally it handles the browser compatibility issue. While using these frameworks you will find your application is compatible to even IE6 which has become a big pain for developers
I would not recommend you to use native JS for development,
In short these framework will directly absorb your all worries of browser compatibility issues
Actually you should first test on IE 6 if thats working then you can directly assume every thing will work fine :)
i use fire fox and fire bug to make sure that my js is not throwing any errors.
IE 9 has included developer tools now too.. It can check backwards comparability and has some debugging for js (press f12 i think.)
Chrome also has its own built in version which rocks.. You can find that by right clicking the page and choosing inspect element and then choosing the scripts tab
Hope this gives you a good place to start looking at debugging your code.
精彩评论