Anyone know how to copy from 1 DIV to another?

 

I have my Ajax action return info to my update DIV, then I need to call the
js function to copy info from one DIV to another. The same call / Ajax
request can be made over and over on the same page getting different data
every time.

 

I get it to work the first time then it stops working.

 

Ideas?

 

I have this on the bottom of the element that returns with the ajax data

 

<script type="text/javascript">

$(function(){

  var str = $('#new').html();

$('#old').html(str); 

$('#new).remove( function() {

             var str = null;

            });        

});

</script>  

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to