PDA

View Full Version : [SOLVED]Picture doesn't show up in Ext.Msg.show component



Wuschelbeutel
16 Jan 2011, 10:32 AM
<html>
<head>
<title>Getting Started Example</title>
<style type="text/css" title="milton-icon"> milton-icon{
background: url(milton-head-icon.png) no-repeat;
}
</style>
<link rel="stylesheet" type="text/css" href="lib/extjs/resources/css/ext-all.css" />
<script src="lib/extjs/adapter/ext/ext-base.js"></script>
<script src="lib/extjs/ext-all-debug.js"></script>
<script>
if (Ext.BLANK_IMAGE_URL.substr(0, 5) != 'data:') {
Ext.BLANK_IMAGE_URL = 'lib/extjs/resources/images/default/s.gif';
}
Ext.onReady(function(){
//do other stuff here
Ext.Msg.show({
title: 'Milton',
msg: 'Have you seen my stapler?',
buttons: {yes:true, no:true, cancel:true},
icon: 'milton-icon',
fn: function(btn){
Ext.Msg.alert('You clicked',btn);
}
});});
</script>
</head>
<body>

</body>
</html>milton-head-icon.png is in folders www, lib, and extjs, with the directory structure www\lib\extjs

The dialog pops up and the second alert as well, just not the pic.

EDIT: My error was forgetting the . on the CSS class