PDA

View Full Version : do something on buttonclick



chrizmaster
21 Feb 2009, 9:15 AM
Hi there,

i have this function:



utilities.msgbox = function(p_title,p_msg, p_buttons, p_type){
Ext.Msg.show({
title: p_title,
id: 'btn',

msg: p_msg,
buttons: p_buttons,
animEl: 'elId',
icon: p_type,
handler: function(btn, text){
if (btn == 'ok') {
window.location = 'index.jsp';
}
}
});


but it's not working. It's not redirecting to the index.jsp. What's the problem here?

Thx
Chriz

Animal
21 Feb 2009, 9:40 AM
fn not handler

chrizmaster
21 Feb 2009, 9:55 AM
aha,

thank you very much. By the way, I looked at the debugger (again) but couldn't find something cause I used the wrong function as it seems..:)

mhm I cant' find this fn thing in the api. What is this fn and where can I find a good example to learn for the future?

Thanks

Animal
21 Feb 2009, 10:13 AM
Er... http://extjs.com/deploy/dev/docs/?class=Ext.MessageBox&member=show

http://i131.photobucket.com/albums/p286/TimeTrialAnimal/msgdocs.jpg