-
evaluating javascript in an ajax response
1) Script Title:
Ajax Tabs Content script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...axtabscontent/
3) Describe problem:
I am a relative javascript/ajax n00b, and I have what I'm sure is a common problem, but I have been unable to solve it. I am using the Ajax Tabs script to load up different pages from my site in a nice tabbed interface. Some of my target URLs contain javascript. When the innerHTML replacement occurs, that javascript is inserted into the page (along with all the HTML from my target URL), however, it does not run. I know that the "eval()" function is probably required here, but I do not know what the best practice is for using it in this scenario.
I would greatly appreciate any help. Thank you.
-
-
To anyone with much javascript experience, eval() is about as close as you can get to evil in a scripting language. Besides that, I cannot imagine how it could help in this situation which has been covered quite a bit in these forums. Lacking a specific example, and considering that you say you are new to all of this, I would direct you here:
http://www.dynamicdrive.com/forums/s...ad.php?t=17426
If you need more help, a link to your problem page and an explanation of the details of the problem would facilitate matters.
-
-
thank you
jscheuer1,
Thank you for the link. I had searched through these forums, but my problem was that I didn't know enough to be using the correct search terms. I'm going to go off now and do some reading.
Thanks again.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks