Results 1 to 3 of 3

Thread: Adding javascript inside Ajaxcontent script

  1. #1
    Join Date
    Mar 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Adding javascript inside Ajaxcontent script

    1) Script Title: ajax content

    2) Script URL (http://www.dynamicdrive.com/dynamici...xcontent.htm):

    3) Describe problem:

    I can't mix javascript inside the ajaxcontent scritp.

    I'm trying to add the java tab inside the ajaxcontent script but it doesn't work. even a simple mouse over doesn't work inside the ajaxcontent,

    Any idea how to mix or add javascript with ajaxcontent?

    cheer

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    A simple mouseover should work as long as any paths used in its code are correct for the 'top' page's location. However, if your mouseover code requires initialization and/or preloading onload, it isn't entirely simple. If images must be preloaded, that can be done on the top page, once again, the paths must be valid for that page. If other initialization is required, it must be done after the content is imported to the top page. Paths must be correct for the top page as that is where the code actually is. Initialization strategies are discussed here (simpler and good for most things):

    http://www.dynamicdrive.com/forums/s...ad.php?t=17426

    and here (more complex but good for tough cases):

    http://www.dynamicdrive.com/forums/s...ad.php?t=13003
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you,
    loading all .js in the top page helped.
    some scripts who need something to close the script doesn't work. i will looking for javascript who don't need code at the end of script.

    Now i'm looking to add a search form in the ajax content script.
    I created a link to test if my search results work and it's working
    here the code:
    Code:
    <a href="javascript:ajaxpage('index.php?do=recherche&seek=music', 'maincolumn');">link to click</a>
    The world "music" is the query test.

    Any Help to create a search form?

    Thank you
    Last edited by onigetoc; 03-26-2007 at 09:30 PM.

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
  •