This project is archived and is in readonly mode.

#1226 ✓invalid
cheppner

Response can't leave script tags in place

Reported by cheppner | May 5th, 2011 @ 12:30 PM

Hello,

I tried to use Request for some ajax content insertion (Request.HTML did no better). When the answer contained a javascript captcha it was removed when I inserted the html (via innerHTML = ...).

I had the choice between evalRequest and evalScripts to change this behaviour. evalRequest did what I want in Firefox and Safari:
It left the script tags in place so that I could do some magic to get them working again (innerHtml assignments don't really work with scripts).

However - this evaluated the whole response which failed in Chrome because the response did contain html and not javascript. What I really wanted was something like evalScripts=false which leaves the script tags in place.

Request.implement({
    processScripts: function(text){
        return text;
    }
});

Did the trick for me but I think there should be another flag or something.

Bye,
- CH

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages