Executing JS <script> that has been inserted with an ajax call ? #2352
Answered
by
BobSquarePants
BobSquarePants
asked this question in
Q&A
-
Hi everyone, Before I was using htmx to make my ajax call, but now that I'm using "fully" Bryhton I got rid of The only problem is when I do #simplified version
def FunctionCompleted(req):
document['aDIV'].innerHTML = req.text
req = ajax.Ajax()
req.bind('complete', FunctionCompleted )
req.open('POST', '/aURL', True)
req.send( something ) I got well the I'm not stick to anything, so it can be another approch than using Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
BobSquarePants
Dec 29, 2023
Replies: 1 comment
-
I've found a way 🥳 #adapted from: https://stackoverflow.com/a/72276629/11943028
def FunctionCompleted(req):
document['aDIV'].append(document.createRange().createContextualFragment(req.text)) it just work ! I have no ideas why !? because I don't get the purpose of |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BobSquarePants
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found a way 🥳
it just work ! I have no ideas why !? because I don't get the purpose of
createRange