Sunday, July 22, 2012

Javascript alert message in AJAX

When we use AJAX into the page then we cannot show alert message using RegisterStartupScript to show the alert message in AJAX page you can use the below code

ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "alertmsg", "alert('Your Message!.');", true);

Jquery Conflication

When we use more than one jquery files then sometimes there would be some confliction between common objects. As a result of confliction functionality cannot work properly. To remove this confliction you can use below code

 

<script type="text/javascript">
var $j = jQuery.noConflict();

$j(document).ready(function(){ 
$j("#slider").easySlider();
}); 
</script>

Above code make different object and remove confliction of two objects.