Results 1 to 3 of 3

Thread: "calling function directly"

  1. #1
    Join Date
    Nov 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default "calling function directly"

    Hello again. Using the Dynamic Ajax Content Script with lots of pleasure, it simply is great. One problem though, that i seem to be to stupid to resolve.

    I would like to have on external page loaded in the container, immediately when the mainpage is shown, and thought it would work as written in the explanations of the script:

    You can even load an external page without requiring the click of a link, by calling the function directly:

    <script type="text/javascript">
    ajaxpage('test.htm', 'rightcolumn') //load "test.htm" into "rightcolumn" DIV
    </script>
    Could somebody explain where i should put that line of code? I have tried in several locations but cannot get it to work .... please, help !

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    At the bottom of your <body> tag should work nicely.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Yep, as long as that function is called following the container <DIV> within the source (and not before), it should work. If not, the function will try and embed the page while the DIV isn't even loaded yet, and an error will be returned.

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
  •