Results 1 to 3 of 3

Thread: impossible load javascript with loadobjs

  1. #1
    Join Date
    Jun 2008
    Location
    Chile
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation impossible load javascript with loadobjs

    Hi, I think that is a very recurrent problem but I donīt find the solution. I've problem loading the javascript using ajax. the code of the "accordion"page is:
    HTML Code:
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    
    <p>Welcome </p>
    
    
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">TAB1</div>
        <div class="AccordionPanelContent">Content1</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">TAB 2</div>
        <div class="AccordionPanelContent">Content2 </div>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    //-->
    </script>
    here's the code http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    I can load the css file with loadobjs(), but not the js file and the little script included into the accordion page.

  2. #2
    Join Date
    May 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Speaking with zero knowledge of "ajax" "accordions", etc, it stikes me that your .js and .css loading statements are simple HTML. What does ajax have to do with it? I don't see why it doesn't work either. But there are a couple of maybe's. Here's what I use for the .js files:

    <script language="JavaScript" type="text/javascript" src='css/smilies.js'></SCRIPT>

    Maybe it's balking because you don't have the language ="JavaScript" part.

    Also, I always put my CSS first. Seems to me I learned that somehow back when T-Rexes were circling our camp looking for a meal. It's worth a try.

  3. #3
    Join Date
    Jun 2008
    Location
    Chile
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for you answer radostsguy!! But it's not just simple html, the javascript activate de accordion panel. And I try your solution but don't work.

    Anyone else please?

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
  •