最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net - Javascript for Google Chrome detecting & Enable javascript in Google Chrome - Stack Overflow

programmeradmin2浏览0评论

My application's JavaScript is working on Firefox and IE but it is not working in Google Chrome. Is it problem of enable javascript in Google chrome? or I must put any code in javascript for getting XMLHttpRequest Object of Google chrome browser.

My application's JavaScript is working on Firefox and IE but it is not working in Google Chrome. Is it problem of enable javascript in Google chrome? or I must put any code in javascript for getting XMLHttpRequest Object of Google chrome browser.

Share Improve this question asked Apr 17, 2009 at 10:50 ashish bhattashish bhatt 3,1615 gold badges26 silver badges23 bronze badges 3
  • Can you give us an example of something that's not working? What about a simple alert() ? – Wayne Koorts Commented Apr 17, 2009 at 10:54
  • yes, I call one function of javascript when <input type="text" id="txt_acname1" runat="server" style="height:18px;Width:118px;" maxlength="30" onblur="ajaxFunction(this.value)" /> It will not give one alert which is given in that at the starting of this function. please help me. – ashish bhatt Commented Apr 17, 2009 at 11:14
  • I got two errors in that Like Sys is not define Sys.WebForms.PageRequestManager._initial... document.getElementById('aspnetForm')); and Sys.Application.initialize(); – ashish bhatt Commented Apr 17, 2009 at 11:31
Add a ment  | 

4 Answers 4

Reset to default 1

If the code works in two other browsers but not in Chrome, you need to look at the code for your "ajaxFunction" because that is apparently what is giving Chrome a headache. As @Artem mentioned, Ctrl+Shift+J will bring up the Javascript Console (switch it to the "Scripts" tab) and you can easily examine any errors.

Google Chrome's Javascript engine interprets JS very similarly to the other browsers mentioned. What is it that doesn't appear to be working?

There is a Javascript Console in Chrome, press Ctrl+Shift+J to open it and check for errors.

Is this question related to this problem? Problem could be that .NET thinks you're using the Safari Browser instead of Chrome...

发布评论

评论列表(0)

  1. 暂无评论