www.webdeveloper.com
Results 1 to 4 of 4

Thread: js in AJAX div

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Posts
    33

    js in AJAX div

    Hello

    I have simple div. The pattern of my site seems like that:
    1)included css and js
    2)<div> ajax content (the above js is needed)</div>

    I have problem becouse ajax content doesnt see above scripts.
    Everything is working if include scripts for example jquery in div. But once more is necessary??

    1)included css and js
    2)<div>
    included js(now its working but the same scripts once more)
    ajax content

    </div>

  2. #2
    Join Date
    Jan 2012
    Posts
    31
    Not to be critical, but your english is a bit rough to follow.

    I would suggest posting, at least, the parts of your code that are relevant to your problem (use the [CODE ][/CODE ] tags for easy reading). Code is language neutral and most here may be able to understand your problem better just by reading the code.

    Also your talking about an AJAX problem. These kinds of problems are a bit more difficult to diagnose, so make your questions more detailed. Multiple sentence explanations are a good thing. Remember we haven't the slightest idea what your trying to do. And even if we did there is variety of ways to approach almost any project. So any detail you leave out of your questions can lead to poor answers.

  3. #3
    Join Date
    Jul 2009
    Location
    My house, sitting at the computer. Duh!
    Posts
    118
    It sounds like (I think) his javascript is running before the page is done loading, and thus, doesn't see the div. Try adding your javascript once at the end of the body tag.

    Code:
            <script src="" type=""></script>
        </body>
    </html>

  4. #4
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,633
    tracking JS errors is very useful to find bug reasons
    xxx: Guess Buddhist riddle: "What is the sound of one hand clapping?"
    yyy: facepalm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles