Results 1 to 2 of 2

Thread: javascript on Ajax

  1. #1
    Join Date
    Aug 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default javascript on Ajax

    1) Script Title: Ajax Tabs Content script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tent/index.htm

    3) Describe problem: Hi there may be you will not helpme on this but I hope you can I want to run this script

    http://www.softcomplex.com/products/...tree_menu_pro/

    inside the ajax tabs content.

    1. I am sure the tigra menu workd fine, because if I run just the page that contains the tigra menu it runs.
    2.the problem is that I need to run this javascript code inside the ajax tabs content:
    <script language="JavaScript">
    new tree (<?php echo $tree_items ?>, TREE_TPL);
    </script>

    As you can see the first parameter of the function is a dynamic javascript variable...again I tested out of the ajax tabs and it works.

    so this script has to load this other js scripts in order to run

    <link rel="stylesheet" href="tree.css">
    <script language="JavaScript" src="tree.js"></script>
    <script language="JavaScript" src="tree_tpl.js"></script>

    so I just call it like this:

    <ul id="maintab" class="shadetabs">
    <li ><a href="#default" rel="ajaxcontentarea"><img src="images/search.gif" border="0" align="top">&nbsp;Search</a></li>
    <li><a href="faq.php?idcategory=-1" rel="ajaxcontentarea" rev="tree.css,tree.js,tree_tpl.js" ><img src="images/folders.gif" border="0" align="top">&nbsp;Categories</a></li>

    <li class="selected"><a href="faq.php?idcategory=<?php echo $_REQUEST['idcategory']?>" rel="ajaxcontentarea" rev="faq.php?idcategory=<?php echo $_REQUEST['idcategory']?>"><img src="images/questions.gif" border="0" align="top">&nbsp;<?php echo $_REQUEST['catname']?></a></li>
    </ul>

    <div id="ajaxcontentarea" class="contentstyle">
    <p>Please insert your keywords to search in our F.A.Q.</p>
    </div>

    <script type="text/javascript">
    //Start Ajax tabs script for UL with id="maintab" Separate multiple ids each with a comma.
    startajaxtabs("maintab")
    </script>

    but I know the funciton

    <script language="JavaScript">
    new tree (<?php echo $tree_items ?>, TREE_TPL);
    </script>

    cannot be run in the internal page on the ajax tabs, so how can I execute that function.

    Again...I testes outsite the ajax and the menu works!!!
    please help,
    thanks

  2. #2
    Join Date
    Aug 2006
    Location
    UK
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I too have a similar problem, if you find a way round this I would be very interested to learn how you did it. Similarly if I find a way round my problem I will let you know

    Regards

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •