Nevermind Simple misunderstanding of asynchronous.. too many hours
typing ...
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
From: Ralph Brickley [mailto:i...@topsoftweb.com]
Sent: Friday, March 19, 2010 6:50 PM
To: prototype-scriptaculous@googlegroups.com
Subject: RE: [Proto-Scripty] Help! IE Problem
I've narrowed this down to a Javascript/Prototype problem. When I call the
request_template function I provide it the current value of the drop down
select box through $('Template').value, which is from a select
name=Template id=Template style=width:150px;.../select form field.
request_template($('Template').value, $('template_preview_box'));
if I alert($('Template').value) right before I call request_template(...) in
IE I get undefined, in Firefox I get the proper result.
I'm really not sure why this is happening?
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
From: Ralph Brickley [mailto:i...@topsoftweb.com]
Sent: Friday, March 19, 2010 6:31 PM
To: prototype-scriptaculous@googlegroups.com
Subject: [Proto-Scripty] Help! IE Problem
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.
--
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.
--
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