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. XMLHttpRequest open method in javascript function not calling asp page load event.

XMLHttpRequest open method in javascript function not calling asp page load event.

Scheduled Pinned Locked Moved JavaScript
questionjavascriptdatabasetutorial
1 Posts 1 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 Offline
    S Offline
    Steve Holdorf
    wrote on last edited by
    #1

    I am using the XMLHttpRequest object to do a xmlhttp.open in a javascript function; however, when I make the open call the asp page's onload event never gets fired. See example below: function myfunct () { var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "myPage.aspx?Action=Save", true); } What I was trying to do was call a asp code behind method from javascript. I tried PageMethods but it only calls static methods. Then I attempted to go with the XMLHttpRequest object and use the asp code behind on load event to get the query string and process based on it's value. Now, I don't want a postback so I set the async parameter to true but now it still does not work. What is the best way to access non static code from javascript? 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