Question : Using javascript functions inside an Ajax Div

Hi Experts!

I've got an urgent and maybe a bit complicated question.
I'm developing a site which is using ajax and a lot javascripts.
The problem:
I've got a main site with an ajax div (I'm using Ajax Content for this: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm). Into the ajax div I'd like to load an external page (portfolio.php) which is using Slideviewer Gallery (http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html). Now you may know what is my problem. When I try to load the portfolio.php into the div, the slideviewer stops and does not work anymore. I read a lot about the problem via javascript but (to use eval(), etc), but I can't solve the problem.
How could I include the scripts into my sites? Is it a problem if both the main site, both the portfolio.php use the jquery.1.3.2.min.js pack?

Thank you for the time!
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
This is the ajax part of my index.php:
..
  • ATL, BTL
  • ..
    The portfolio.php:
      "; echo "
      "; echo "\"".$p['p_desc']."\"
      "; echo "

      Partner: |"; echo $p['p_desc']; echo "

      "; echo ""; } ?>
    Open in New Window Select All

    Answer : Using javascript functions inside an Ajax Div

    Although, now that I think about it a little more, JQuery itself has the ability to dynamically load scripts. This is a built in functionality of the library. Unfortunately, I don't have my books here today.

    There is a build in function called getScript. This means that JQuery needs to be loaded in the head of all your documents, but that you can use it to load other scripts as they are needed.

    Again, I've never used it, however, since you are familiar with JQuery, this may be what you need.

    Fond some information on the web about using it:
    http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback
    http://colourgray.wordpress.com/2008/09/22/jquery-loading-external-javascript-files-using-getscript/
    Random Solutions  
     
    programming4us programming4us