Results 1 to 4 of 4

Thread: Bad urls with Dynamic Ajax Content script

  1. #1
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Bad urls with Dynamic Ajax Content script

    1) Script Title:
    Dynamic Ajax Content

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    3) Describe problem:
    I am using this script to show the forum which is located on 'domainname'/folder1/index.php on the server.

    The page is showing up, but now the links on the forum is pointing to the folder I am calling the forum from ('domainname'/folder2/index.php) not the folder where the php file is located (folder1).

    i.e. the url for logging in should be: 'domainname'/folder1/login.php. But with this script, the url becomes 'domainname'/folder2/login.php, which obviously doesn't work, since that file is located inside folder1.

    Is there a way to set the links in the called php file to point to another directory than the directory where the page is called from?

    I was originally using the SSI Iframe script, but the height resizing doesn't work in Opera, but this script works.

  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

    Sounds like the paths are being correctly interpreted. If you have a link like so:

    HTML Code:
    <a href="login.php">Login</a>
    on a page in folder2, folder2 is here the browser should ordinarily look for it.

    I'm not sure if this will work, but it is worth a shot. First off, you will need to specify the complete path to any pages, external css files, and external javascript files not to be loaded in the base path. With that in mind, try this - put a base href tag in the head of your 'top' page (just below the <title></title> tag, and if your page is organized correctly, after any meta tags which should immediately follow the title tag). I'm talking about on the page with the Ajax Content Script on it. From what you are saying, the base href tag should be like:

    HTML Code:
    <base href="http://www.domainname.com/folder1/>
    Now, of course, any other hrefs and paths on that 'top' page that should not start with that href should have their complete paths spelled out. The only other alternative (short of moving your Ajax page to folder1) I can think of would be to make sure that all of the external pages have all of their links' complete paths spelled out on them.
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That worked for the Ajax Includes script (it did not work for the above script) but when I click on a link inside the div, the new page that loads is not loaded into the div, but opens the page in full screen. Is there a way to make everything open in the same div?
    Last edited by ove.a; 01-04-2007 at 07:56 PM.

  4. #4
    Join Date
    Sep 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ove.a - maybe you can make forum link starting with "<a href="javascript:ajaxpage" too (I mean that forum link should be just like "menu" links?

    Maybe it'll work your way.

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
  •