0

hi,
i need load a url in a div i have found many samples that work in that way,
the problem is that i need javascript working in the destination link
and for some reason the javascript dont work in the div that i load.
there is any way to resolve this issue?
what i need to do is load a url and that url have css and javascript that must
be working as loaded from a regular browser.
thanks a lot for your help
:)

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by SikoSoft
0

The problem is that any additional JavaScript code returned will NOT be evaluated. I've run into this problem a few times myself; there are workarounds, such as an example found here on an old thread:

http://www.daniweb.com/forums/thread53137.html

.. But I honestly believe the best bet is to not rely on evaluating mixed HTML/SCRIPT at all, and instead find a way to write your JavaScript/AJAX functions so that they only update the HTML and then invoke additional JavaScript functions (perhaps as a callback) which do the additional code. Sometimes it can be really tricky to figure out effective ways to do this, but it is always possible if you put enough thought into it. I know it can be tricky because I've had to completely rethink how I did many things, but it can always be done!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.