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. how to reflect changes on browser done using javascript

how to reflect changes on browser done using javascript

Scheduled Pinned Locked Moved ASP.NET
javascripthtmltutorial
4 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.
  • M Offline
    M Offline
    monu nair
    wrote on last edited by
    #1

    i tried to append or remove node from body section to Head section. whend i see in javascript it is working fine. but at last when page render on browser it does not reflect the changes done on page on browser. even i see the source code it still show the original Html in page. below is my code. document.getElementById('pop').removeChild(newNode); document.getElementById('pop').appendChild(newnode); Mahendra

    G 1 Reply Last reply
    0
    • M monu nair

      i tried to append or remove node from body section to Head section. whend i see in javascript it is working fine. but at last when page render on browser it does not reflect the changes done on page on browser. even i see the source code it still show the original Html in page. below is my code. document.getElementById('pop').removeChild(newNode); document.getElementById('pop').appendChild(newnode); Mahendra

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

      The only information that is sent to the server on a postback is the values in the form fields. The entire page is not sent back to the server, so the server code have no idea that you have added or removed elements in the page. On a postback, the entire page is created from scratch. If you want the server code to do the same changes as you did in the client script, you have to send some information back to the server that it can use to determine what elements should be on the page.

      --- single minded; short sighted; long gone;

      M 1 Reply Last reply
      0
      • G Guffa

        The only information that is sent to the server on a postback is the values in the form fields. The entire page is not sent back to the server, so the server code have no idea that you have added or removed elements in the page. On a postback, the entire page is created from scratch. If you want the server code to do the same changes as you did in the client script, you have to send some information back to the server that it can use to determine what elements should be on the page.

        --- single minded; short sighted; long gone;

        M Offline
        M Offline
        monu nair
        wrote on last edited by
        #3

        actually i am calling a javascript method on body onload which is client site. and i written the code in javascript method after page render. actualli i debug the javascript

        G 1 Reply Last reply
        0
        • M monu nair

          actually i am calling a javascript method on body onload which is client site. and i written the code in javascript method after page render. actualli i debug the javascript

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

          Then there is simply something wrong with your Javascript code. What does the code look like, and what error message do you get?

          --- single minded; short sighted; long gone;

          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