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. ASP.NET
  4. ajax and img

ajax and img

Scheduled Pinned Locked Moved ASP.NET
help
3 Posts 3 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.
  • C Offline
    C Offline
    cmarmr
    wrote on last edited by
    #1

    can somebody help me out i trying to figure out how i can use ajax to load a new img without a postback

    Thanks, Chad Aiena

    G M 2 Replies Last reply
    0
    • C cmarmr

      can somebody help me out i trying to figure out how i can use ajax to load a new img without a postback

      Thanks, Chad Aiena

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      You can't use AJAX to load an image. If you need a call to the server to find out the name of the image, you can use AJAX, but the loading of the image itself is done by the browser. If you don't need a call to the server to find out the name of the image, you don't need AJAX at all.

      --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • C cmarmr

        can somebody help me out i trying to figure out how i can use ajax to load a new img without a postback

        Thanks, Chad Aiena

        M Offline
        M Offline
        morteza57
        wrote on last edited by
        #3

        perhaps this be your answer : var img=new Image(); MyImage.src="newImage.jpg"; function Change() { document.images[0].src=MyImage.src; } now you can call Change function to load new Image without postback.

        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