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. Swapping image + server side script [modified]

Swapping image + server side script [modified]

Scheduled Pinned Locked Moved Web Development
csharpjavascriptdatabasesysadminalgorithms
2 Posts 2 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.
  • N Offline
    N Offline
    Naveed Kamboh
    wrote on last edited by
    #1

    Hi All, Can any one help me for the following please. I have an image on Main page this image is a link to the popup page. Wehn you click on the image it shows you a popup page where you can do some actions, I am asking user to insert some information into the database on this popup. Whenuser insertes a record I need to change the image on main page i.e if Image souurce was image1.jpg I want to change it to image2.jpg. Any ajax , c# or Javascript code will do to me. Thanks in advance

    Naveed Kamboh Complexity kills, Write easy code for your self. Punjabi stuff

    modified on Wednesday, December 17, 2008 11:20 AM

    M 1 Reply Last reply
    0
    • N Naveed Kamboh

      Hi All, Can any one help me for the following please. I have an image on Main page this image is a link to the popup page. Wehn you click on the image it shows you a popup page where you can do some actions, I am asking user to insert some information into the database on this popup. Whenuser insertes a record I need to change the image on main page i.e if Image souurce was image1.jpg I want to change it to image2.jpg. Any ajax , c# or Javascript code will do to me. Thanks in advance

      Naveed Kamboh Complexity kills, Write easy code for your self. Punjabi stuff

      modified on Wednesday, December 17, 2008 11:20 AM

      M Offline
      M Offline
      Michael Hendrickx
      wrote on last edited by
      #2

      If you have an id assigned to your tag, such as You could execute certain code on a onclick or onblur event: The javascript code itself would be: changeImage() { var i = new Image(); i.src = "/images/image2.jpg"; document.getElementById("foobar").src = i.src; } Hope this helps, m1ke places.ae

      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