Hello All! I'm having an extraordinarily hard time with IE again... 

 

My situation is I have a preview window that opens up, changes a <textarea>
with tinyMCE and then makes an ajax request to catch some HTML and load it
into the <textarea>. I'm testing it sending back a single byte, 1.

 

The deal? Firefox shows the 1. IE? Blank or undefined. This is outrageous!
Heres my code that is called from another function that handles opening the
preview window: (the alert is for testing)

 

//            template = ID of template in database, element = ID of element
to fill <textarea>

function request_template(template, element)

{

                //            Request the update to the server (
newsletter.php )

                new Ajax.Request('newsletter.php', 

                {              

                                method: 'post',

                                onSuccess: function(e) 

                                                                { 

 
//Implant the response text into our textarea

 
//            Replace strips extra whitespace

 
alert(e.responseText.replace(/\s/gi, ''));

 
element.innerHTML = e.responseText.replace(/\s/gi, '');

                                                                },

                                onFailure: function(e) 

                                                                { 

 
alert('Unable to submit request. Please try again.'); 

                                                                },

                                parameters: 

                                                                {

 
page: 'templates',

 
action: 'request',

 
type: 'template',

 
Template: template                                                        

                                                                } 

                });

}

 

Both the alert and element.innerHTML show 1 in Firefox, and blank or
undefined in IE. My server code is simply:

 

echo "1";

exit;

 

Help!!!

 

Ralph Brickley

Owner

 

logotrans

435 NE Evans St Ste 115  -  P.O. Box 510  McMinnville, OR 97128

(503) 857-7898 Cell  |  (503) 472-7914 Office  |  (800) 986-0276 Fax

 <http://www.topsoftweb.com/> www.topsoftdesignstudio.com

 

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

<<image001.png>>

Reply via email to