Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. AJAX doesn't work, Why?

AJAX doesn't work, Why?

Scheduled Pinned Locked Moved Web Development
helptutorialquestion
20 Posts 6 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Shog9 0

    I have no idea what you're talking about. The key portion of AJAX is the XmlHttpRequest object, which is built-in in modern browsers (Firefox, Opera, IE7) and implemented as part of the MSXML COM package for IE6 and previous. If you're using IE6 and the MSXML installation is screwed up, it'll never work or always work (unless you're doing something really bizarre with progIds). Keep in mind, for security reasons XmlHttpRequest will be prevented from loading URLs that are on a different host from that which the page was loaded from - so if you're switching up hosts (you are) and have a hard-coded host in the URL passed to XmlHttpRequest (do you?), then it'll break when the hard-coded host doesn't match the host you're loading from. So check that first.

    ----

    ...the wind blows over it and it is gone, and its place remembers it no more...

    H Offline
    H Offline
    hifiger2004
    wrote on last edited by
    #5

    but there's no hardcoded host when loading the form. I really don't know if what's causing it.

    hifiger2004

    S 1 Reply Last reply
    0
    • H hifiger2004

      but there's no hardcoded host when loading the form. I really don't know if what's causing it.

      hifiger2004

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #6

      hifiger2004 wrote:

      but there's no hardcoded host when loading the form.

      So you're using XmlHttpRequest to load a form? What does the code that does this look like?

      ----

      ...the wind blows over it and it is gone, and its place remembers it no more...

      1 Reply Last reply
      0
      • S Shog9 0

        I have no idea what you're talking about. The key portion of AJAX is the XmlHttpRequest object, which is built-in in modern browsers (Firefox, Opera, IE7) and implemented as part of the MSXML COM package for IE6 and previous. If you're using IE6 and the MSXML installation is screwed up, it'll never work or always work (unless you're doing something really bizarre with progIds). Keep in mind, for security reasons XmlHttpRequest will be prevented from loading URLs that are on a different host from that which the page was loaded from - so if you're switching up hosts (you are) and have a hard-coded host in the URL passed to XmlHttpRequest (do you?), then it'll break when the hard-coded host doesn't match the host you're loading from. So check that first.

        ----

        ...the wind blows over it and it is gone, and its place remembers it no more...

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #7

        Too many people think that AJAX was invented by Microsoft with the ASP.NET AJAX libary.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        S 1 Reply Last reply
        0
        • C Christian Graus

          Too many people think that AJAX was invented by Microsoft with the ASP.NET AJAX libary.

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #8

          Yeah, i'm starting to suspect that's what's going on here. :rolleyes: :sigh:

          ----

          ...the wind blows over it and it is gone, and its place remembers it no more...

          H 3 Replies Last reply
          0
          • S Shog9 0

            Yeah, i'm starting to suspect that's what's going on here. :rolleyes: :sigh:

            ----

            ...the wind blows over it and it is gone, and its place remembers it no more...

            H Offline
            H Offline
            hifiger2004
            wrote on last edited by
            #9

            Hi, I actually created a very simple test.aspx for me to test if Ajax is working fine, but still no luck. Please see my sample test.aspx that uses updatepanel <%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> Untitled Page

            hifiger2004

            1 Reply Last reply
            0
            • S Shog9 0

              Yeah, i'm starting to suspect that's what's going on here. :rolleyes: :sigh:

              ----

              ...the wind blows over it and it is gone, and its place remembers it no more...

              H Offline
              H Offline
              hifiger2004
              wrote on last edited by
              #10

              I already reinstalled the AJAX extensions 1.0 but still no luck. It works fine when running in my local machine, but when deploying it in the server the ajax seems not working well. What do you think should I do man? :)

              hifiger2004

              N 1 Reply Last reply
              0
              • H hifiger2004

                I already reinstalled the AJAX extensions 1.0 but still no luck. It works fine when running in my local machine, but when deploying it in the server the ajax seems not working well. What do you think should I do man? :)

                hifiger2004

                N Offline
                N Offline
                N a v a n e e t h
                wrote on last edited by
                #11

                hifiger2004 wrote:

                when deploying it in the server the ajax seems not working well.

                is your server installed with AJAX server extensions ?

                All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

                H 4 Replies Last reply
                0
                • N N a v a n e e t h

                  hifiger2004 wrote:

                  when deploying it in the server the ajax seems not working well.

                  is your server installed with AJAX server extensions ?

                  All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

                  H Offline
                  H Offline
                  hifiger2004
                  wrote on last edited by
                  #12

                  Was it different from Microsoft ASP.net AJAX Extensions 1.0? Is it free and downloadable?

                  hifiger2004

                  1 Reply Last reply
                  0
                  • N N a v a n e e t h

                    hifiger2004 wrote:

                    when deploying it in the server the ajax seems not working well.

                    is your server installed with AJAX server extensions ?

                    All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

                    H Offline
                    H Offline
                    hifiger2004
                    wrote on last edited by
                    #13

                    This is the Ajax installer that I downloaded recently - ASPAJAXExtSetup.msi from this link - http://www.microsoft.com/downloads/details.aspx?familyid=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en I think it's the same AJAX you are refering to, right? hifiger2004

                    1 Reply Last reply
                    0
                    • N N a v a n e e t h

                      hifiger2004 wrote:

                      when deploying it in the server the ajax seems not working well.

                      is your server installed with AJAX server extensions ?

                      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

                      H Offline
                      H Offline
                      hifiger2004
                      wrote on last edited by
                      #14

                      I've been reinstalling the ajax at the server several times but it doesn't work fine. We have to go back to the original problem. When accessing it thru the IP address the ajax will work. But when using the domain name (same IP reference), the ajax won't work. Why?

                      hifiger2004

                      1 Reply Last reply
                      0
                      • N N a v a n e e t h

                        hifiger2004 wrote:

                        when deploying it in the server the ajax seems not working well.

                        is your server installed with AJAX server extensions ?

                        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

                        H Offline
                        H Offline
                        hifiger2004
                        wrote on last edited by
                        #15

                        Actually this is the first time that I encountered this kind of problem that the Ajax will not work. Because I have tried installing some of my projects before at the server with the same web.config, ASP.Net framework 2.0, AJAX Ext 1.0 and AJAXcontrolToolkit and all are working fine. It really confused me :)

                        hifiger2004

                        1 Reply Last reply
                        0
                        • S Shog9 0

                          Yeah, i'm starting to suspect that's what's going on here. :rolleyes: :sigh:

                          ----

                          ...the wind blows over it and it is gone, and its place remembers it no more...

                          H Offline
                          H Offline
                          hifiger2004
                          wrote on last edited by
                          #16

                          Hi Guys, You know, I won't believe it, I solved it. And the solution is not difficult as what we think. I just renamed the folder and overwrite the web.config and then I renamed back the folder and it works fine now. Sometimes things are happening really strange :) Thank you for the time guys

                          hifiger2004

                          C T 2 Replies Last reply
                          0
                          • H hifiger2004

                            Hi Guys, You know, I won't believe it, I solved it. And the solution is not difficult as what we think. I just renamed the folder and overwrite the web.config and then I renamed back the folder and it works fine now. Sometimes things are happening really strange :) Thank you for the time guys

                            hifiger2004

                            C Offline
                            C Offline
                            Christian Graus
                            wrote on last edited by
                            #17

                            One thing you didn't seem to notice. You're saying AJAX when you mean the ASP.NET AJAX extensions. I guarentee to you that AJAX was working fine the entire time.

                            Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                            1 Reply Last reply
                            0
                            • H hifiger2004

                              Hi Guys, You know, I won't believe it, I solved it. And the solution is not difficult as what we think. I just renamed the folder and overwrite the web.config and then I renamed back the folder and it works fine now. Sometimes things are happening really strange :) Thank you for the time guys

                              hifiger2004

                              T Offline
                              T Offline
                              tonymathewt
                              wrote on last edited by
                              #18

                              You mean you renamed the root folder of the application? Why did you have to overwrite the web.config. Did you rename it after deploying? And then renamed it back again? So What should be taken care to avoid the problem that occured?

                              H 1 Reply Last reply
                              0
                              • T tonymathewt

                                You mean you renamed the root folder of the application? Why did you have to overwrite the web.config. Did you rename it after deploying? And then renamed it back again? So What should be taken care to avoid the problem that occured?

                                H Offline
                                H Offline
                                hifiger2004
                                wrote on last edited by
                                #19

                                honestly, I really don't know if what trigger it to work properly now. I was just trying ovewriting the system.web.extensions.dll, foldername, and the web.config. I renamed the folder where my asp.net pages are located. My feeling is that it just like being refresh everything. Because before I did the renaming of folders and overwriting of dlls and web.config it's really not working, even to a very simple test.aspx with scriptmanager and updatepanel. And now it's working fine after doing those trials. Really funny and confusing, because I never changes anything inside my pages source codes as well as the web.config and asp.net dlls. :)

                                hifiger2004

                                1 Reply Last reply
                                0
                                • H hifiger2004

                                  Hi Guys, I have a problem regarding AJAX. when Im accessing the site using an IP something like this http://209.162.184.101/page.aspx the Ajax here works well, the page won't refresh. But when I use something with domain for example http://something.ph/page.aspx the Ajax here doesn't work, the page will refresh. What should I need to do in order to work properly? Thanks

                                  hifiger2004

                                  M Offline
                                  M Offline
                                  Manuel F Hernandez
                                  wrote on last edited by
                                  #20

                                  Are you monitoring with an http monitor to see what the ajax requests look like. Something like http watch or fiddler work well

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups