On 5 Mrz., 16:51, Jonny <[EMAIL PROTECTED]> wrote:
> I know that the people who are asking this
> question (through me) are not wanting to load a heavy js library
> (Jquery), so the advice below won't really work :(
quite dangerous to call jquery "heavy" in this group, as it's one of
the biggest feature of jquery being quite lightweight ;)
but if you do not want to use jquery, just download the source and
check the getscript-method, the main-parts should get you going.
generally i think you need to pass some scope to your ajax-called-
script which returns the java-script.
then you may create a Map[scope_identifier] -> [dom-target] and use
that map when the jscript gets returned.
of course the returning jscript has to transport the scope-identifier
somehow, SCOPE_ID = "23623623..." should be enough...
when trying to defeat xss-protection of the browser, i think most
people use hard-coded callback-functions like:
<script returned by ajax-called-script>
__xss_callback(function() {
code to execute
});
</script>
function __xss_callback(dlg) {
// set right scope
dlg.apply(scope, ....)
}
i hope this gets you going....
but remember: "jquery is not heavy" (TM) ;)