Sto tentando di utilizzare jGrowl in ASP.NET, ma ricevo un errore di runtime di Microsoft JScript: L'oggetto non supporta questa proprietà o errore di metodo durante il tentativo di eseguire la pagina in IE. Qualche idea per cui questo sta accadendo?Errore di runtime di Microsoft JScript: L'oggetto non supporta questa proprietà o metodo
<link rel="stylesheet" href="css/jquery.jgrowl.css" type="text/css" />
<style type="text/css">
div.jGrowl div.smoke {
background: url(images/smoke.png) no-repeat;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
width: 280px;
height: 55px;
overflow: hidden;
}
</style>
<!--[if lt IE 7]>
<link rel="stylesheet" href="css/jquery.jgrowl.ie6.css" type="text/css" />
<![endif]-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.jgrowl.js"></script>
<script type="text/javascript" src="js/jquery.template.js"></script>
<script type="text/javascript" src="js/jquery.ui.all.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$('#test2').jGrowl("TEST", {
theme: 'smoke',
closer: true
});
});
</script>
CORPO:
<a onclick="$('#test2').jGrowl('TEST');" href="javascript:void(0);">Sample 3</a>
Questo ha corretto l'errore, grazie. Una domanda però, per qualche motivo, la finestra di jGrowl viene visualizzata sia quando la pagina viene caricata, sia quando si fa clic sul collegamento. Sai perché sta succedendo? – MiziaQ
@ MiziaQ, è perché stai facendo una chiamata a jGrowl nel gestore '$ (document) .ready'. Quello che probabilmente vorrai fare è rimuovere il gestore oncick sul tag e fare quanto segue in document.ready '$ ('# test'). Click (function (e) {$ (this) .jGrowl (" TEST "); e.preventDefault();}); ' – Vadim