View Single Post
  #2 (permalink)  
Old June 10th, 2008, 12:31 PM
vinod_yadav1919 vinod_yadav1919 is offline
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi oldBroh!!
technically i don't think so..."The info shows up on my web page but when I try to use the value with innerHTML, I get the previous value".

when your ajax response text is written to innerHTML it will contain new value and when you retrieve it,it will always contain new value!!
If possible could you provide your sample code..


try this,its only for showing new value always retained!!
<script>

function setHtml()
{
document.getElementById("mydiv").innerHTML="new value";
}

function getHtml()
{
alert(document.getElementById("mydiv").innerHTML)
}
</script>
<div id="mydiv">Test</div>
<input type=text id="mytext">
<input type=button onclick="setHtml()" value=sethtml>
<input type=button onclick="getHtml()" value=gethtml>

Cheers :)

vinod