SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help! I'm an ajax noobie!

    I'm very new to ajax, and I'm trying to build a site with it for the first time.

    I have successfully built a test page using a script from dynamic drive which reloads content into a div via ajax - see www.id30.com/ajax/home.html.

    However, I now need to build a second page, which will have a number of links to the above mentioned page and automatically load content into the div dependant on which link was selected.

    I'm struggling to figure out a way to pass javascript parameters between html pages, and invoke the script when the page is loaded. If anybody can help me at all, it would be much appreciated.

    Thanks

    David
    Last edited by davemof; Jul 9, 2007 at 08:25.

  2. #2
    SitePoint Guru
    Join Date
    Aug 2003
    Location
    CT
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    javascript doesn't pass between pages really... i'm not sure what you're asking here. Frankly, i don't see any ajac happeneing at all. this is just basic JS

    to invoke when page loads:

    Code:
    function init() { 
    //whatever you want to load 
    }
    
    window.onload = init;
    My Blog: SkeyMedia.com

  3. #3
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Many thanks

    that actually really helped, it was the missing link. I have now created a php variable, which is passed between the two pages, that bit of javascript invokes the function and everything is now working.

    So once again many thanks


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
  •