in reply to [OT?] formatting response text for AJAX widget
What about trying a different approach using JSON:
Inside your JavaScript, use:print qq{ {"componentId": "$componentId", "html": "<a href='#' onClick='javascript:makeForm( \"$componentId\", +\"$componentType\", \"$newTitle\");'>$newTitle</a>"} };
jsonText = eval( '(' request.responseText ')' ); $('override_' + jsonText.componentId).innerHTML = jsonText.html;
In Section
Seekers of Perl Wisdom