views:

30

answers:

2

I have these lines in a script which I'd like to show as an alert instead:

mce_jQuery('#mce-'+resp.result+'-response').show();
mce_jQuery('#mce-'+resp.result+'-response').html(msg);

but the alert displays it as-is, what do I need to change?

+1  A: 
alert($('#mce-'+resp.result+'-response').html());
TuomasR
+2  A: 

I'm not sure if I understand you well, but you might want to alert the text-contents from that element.
Would look like

alert(mce_jQuery('#mce-'+resp.result+'-response').text());
jAndy
Hmm..no alert displayed at all. I've edited the desc to include the following line as well
Nimbuz
@Nimbux , with firebug can you see if you contents in that html , if so it has to print when you say .text() or html() , sometimes .text() doesn't show in ie depending on when you are calling that but .html() should show
gov