PDA

View Full Version : NOOB: Update MessageBox content



ruprict
8 Aug 2007, 2:54 PM
Noob here,

I am trying to update the textarea content of a multiline Ext.MessageBox so it shows content that I have in another form field or that they last typed in. Using the examples, I can get the multiline prompt up and record the text the first time around, but I can't reload the textarea with the previous text.

Any suggestions? Hope that makes sense.

Thanks,
Ruprict

evant
8 Aug 2007, 3:09 PM
You need to save the text somewhere.

So you might have...



Ext.MessageBox.show(
{
title: 'blah'
prompt: true,
value: 'beginning text',
multiline: true,
fn: function(btn, text)
{
if (btn == 'ok')
{
alert('text is ' + text);
//do something to save text
}
}
}
);


Then next time you show the prompt, you pass text as the value.

ruprict
9 Aug 2007, 6:16 AM
Awesome, mate....cheers!