Jump to content

what this snippet means


seco

Recommended Posts

Hi

i find this snippet that edit in place and don't understand it well

 

<script type="text/javascript">

<!--

function editField(what){

  what.style.display="none";

  document.getElementById(what.id.substring(0,what.id.indexOf("_div"))).style.display="inline";

  document.getElementById(what.id.substring(0,what.id.indexOf("_div"))).focus();

}

function updateField(what){

  document.getElementById(what.id+"_div").style.display="inline";

  document.getElementById(what.id+"_div").innerHTML=what.value;

  what.style.display="none";

  what.form.submit();

}

//-->

</script>

 

and this is the source

http://dmxzone.com/showDetail.asp?NewsId=14619&FromTypeId=9&source=Stats

 

how it works? and what it means?

thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/90225-what-this-snippet-means/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.