• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Processing javascript from ajax response?

Sgraffite

Supreme [H]ardness
Joined
Jan 10, 2006
Messages
4,405
I'm loading content from an ajax response that contains:
Code:
<script type="text/javascript">alert('here');</script>

I can't get the javascript to execute though. I've tried both prototype and jquery and neither seem to want to execute javascript within the response text.

Prototype has an evalJS flag you can set to true, however it appears to have no effect on getting the javascript within the ajax response text to run.

Has anyone been able to do this?
 
Usually you write the javascript in the requesting page not in the response, ajax is used to get server side stuff only. But if you insist eval should work, but don't put the script tags just the javascript.
 
Back
Top