How can we reload html page without blinking?

Javascript code makes page reload?

  • hi, could you please tell me why this code makes the page reload? $(function() { $("#delete1").click(function() { var delete_name = $("#delete_name").val(); var delete_comment = $("#delete_comment").val(); var dataString = 'delete_name='+ delete_name + '&delete_comment=' + delete_comment; $.ajax({ type: "POST", url: "../comments/delete_comment.php", data: dataString, cache: false, success: function(html){ $("#flash").show(); $("#flash").fadeIn(400).html(' <span style="color:#F60;" align="absmiddle"><B>Your Comment Has Been Deleted</B></span> '); } }); alert ('hmm'); }); }); i made it using an older code and that one doesnt make the page reload.

  • Answer:

    http://api.jquery.com/jQuery.ajax/ I would try removing the cache: false, line and modifying my success function.

Ilyakar at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.