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. JavaScript
  4. javascript execute usercontrol method without postback

javascript execute usercontrol method without postback

Scheduled Pinned Locked Moved JavaScript
questionjavascripthelp
15 Posts 4 Posters 0 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 Steve Holdorf

    Thank you very much for your help. One question. Does your example cause a postback? I am trying to call the method without a postback. Thanks, Steve Holdorf

    D Offline
    D Offline
    Dennis E White
    wrote on last edited by
    #5

    Steve Holdorf wrote:

    One question. Does your example cause a postback?

    the nature of an AJAX call is that the are asynchronous. :-D

    as if the facebook, twitter and message boards weren't enough - blogged

    S 1 Reply Last reply
    0
    • D Dennis E White

      Steve Holdorf wrote:

      One question. Does your example cause a postback?

      the nature of an AJAX call is that the are asynchronous. :-D

      as if the facebook, twitter and message boards weren't enough - blogged

      S Offline
      S Offline
      Steve Holdorf
      wrote on last edited by
      #6

      Again thanks. One problem for me; however, I am using AJAX but not jquery. I still hope there is another solution using just AJAX. Again thanks! Steve Holdorf

      D 1 Reply Last reply
      0
      • S Steve Holdorf

        Again thanks. One problem for me; however, I am using AJAX but not jquery. I still hope there is another solution using just AJAX. Again thanks! Steve Holdorf

        D Offline
        D Offline
        Dennis E White
        wrote on last edited by
        #7

        you can still do it without jQuery however you would have to handcode the call and deal with the various flavors of browsers that are out there. the benefit of jQuery is that encompasses all the nuances of the different browsers for you. I personally would recommend your going the route of using some javascript framework.

        as if the facebook, twitter and message boards weren't enough - blogged

        S 1 Reply Last reply
        0
        • D Dennis E White

          you can still do it without jQuery however you would have to handcode the call and deal with the various flavors of browsers that are out there. the benefit of jQuery is that encompasses all the nuances of the different browsers for you. I personally would recommend your going the route of using some javascript framework.

          as if the facebook, twitter and message boards weren't enough - blogged

          S Offline
          S Offline
          Steve Holdorf
          wrote on last edited by
          #8

          Again thanks for sharing your knowledge!!!! I am still a little lost. Can anyone post a small demo or a link to one? Again thanks!!! Steve Holdorf

          D 1 Reply Last reply
          0
          • S Steve Holdorf

            Again thanks for sharing your knowledge!!!! I am still a little lost. Can anyone post a small demo or a link to one? Again thanks!!! Steve Holdorf

            D Offline
            D Offline
            Dennis E White
            wrote on last edited by
            #9

            there is this article: AJAX for Beginners (Part 2) - Using XMLHttpRequest and jQuery AJAX to implement a cascading dropdown[^]

            as if the facebook, twitter and message boards weren't enough - blogged

            S 1 Reply Last reply
            0
            • D Dennis E White

              there is this article: AJAX for Beginners (Part 2) - Using XMLHttpRequest and jQuery AJAX to implement a cascading dropdown[^]

              as if the facebook, twitter and message boards weren't enough - blogged

              S Offline
              S Offline
              Steve Holdorf
              wrote on last edited by
              #10

              Your link is great but it still uses jquery. Does anyone have a link just using AJAX and javascript? Thanks, Steve Holdorf

              M 1 Reply Last reply
              0
              • S Steve Holdorf

                Your link is great but it still uses jquery. Does anyone have a link just using AJAX and javascript? Thanks, Steve Holdorf

                M Offline
                M Offline
                Manfred Rudolf Bihy
                wrote on last edited by
                #11

                Then go back again to that article and read a bit more carefully. The article explains how to achieve the same goal using standard AJAX and then also utilizing jQuery. So the answer is there. If you'll look again just search for "Using XMLHttpObject". The part using jQuery is under the heading "Using jQuery". I do think these two shouldn't be too hard to distinguish. Regards,

                — Manfred

                "I had the right to remain silent, but I didn't have the ability!"

                Ron White, Comedian

                S 2 Replies Last reply
                0
                • M Manfred Rudolf Bihy

                  Then go back again to that article and read a bit more carefully. The article explains how to achieve the same goal using standard AJAX and then also utilizing jQuery. So the answer is there. If you'll look again just search for "Using XMLHttpObject". The part using jQuery is under the heading "Using jQuery". I do think these two shouldn't be too hard to distinguish. Regards,

                  — Manfred

                  "I had the right to remain silent, but I didn't have the ability!"

                  Ron White, Comedian

                  S Offline
                  S Offline
                  Steve Holdorf
                  wrote on last edited by
                  #12

                  You are correct. XMLHttpRequest does work for AJAX as well; however, not for what I am doing. Really, all I need to do is to get the usercontrol object (the container control) in my javascript and call the SaveData code behind method (of the container control) without a postback. Thanks for everyones help; however, I am still stuck. Steve Holdorf

                  S 1 Reply Last reply
                  0
                  • S Steve Holdorf

                    You are correct. XMLHttpRequest does work for AJAX as well; however, not for what I am doing. Really, all I need to do is to get the usercontrol object (the container control) in my javascript and call the SaveData code behind method (of the container control) without a postback. Thanks for everyones help; however, I am still stuck. Steve Holdorf

                    S Offline
                    S Offline
                    Steve Holdorf
                    wrote on last edited by
                    #13

                    One thought. I could move the method to the parent page if someone knows how to call a method in the containing page from one of its usercontrols using javascript without a postback. I hope this is also possible. Anyway, with all of the posts everyone has been great! I just got to get it working. Thanks, Steve Holdorf

                    S 1 Reply Last reply
                    0
                    • S Steve Holdorf

                      One thought. I could move the method to the parent page if someone knows how to call a method in the containing page from one of its usercontrols using javascript without a postback. I hope this is also possible. Anyway, with all of the posts everyone has been great! I just got to get it working. Thanks, Steve Holdorf

                      S Offline
                      S Offline
                      Steve Holdorf
                      wrote on last edited by
                      #14

                      OK. I found a way to call the page method from the usercontrol. Now, the problem is PageMethods.SaveData() is only used for static methods. How do I call a non-static page method from my javascript? Thanks, Steve Holdorf

                      1 Reply Last reply
                      0
                      • M Manfred Rudolf Bihy

                        Then go back again to that article and read a bit more carefully. The article explains how to achieve the same goal using standard AJAX and then also utilizing jQuery. So the answer is there. If you'll look again just search for "Using XMLHttpObject". The part using jQuery is under the heading "Using jQuery". I do think these two shouldn't be too hard to distinguish. Regards,

                        — Manfred

                        "I had the right to remain silent, but I didn't have the ability!"

                        Ron White, Comedian

                        S Offline
                        S Offline
                        Steve Holdorf
                        wrote on last edited by
                        #15

                        Manfred, Sorry about the repeated posts. It won't happen again. Thanks, Steve Holdorf :((

                        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