Results 1 to 4 of 4

Thread: Problem with Ajax XML Ticker

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

    Unhappy Problem with Ajax XML Ticker

    1) Script Title: Ajax XML Ticker (txt file source)

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

    3) Describe problem:
    Hi , I have loaded Ajax XML Ticker on my computer successfully but I can`t load it in my website (external server) .
    I use Firebug . But Firebug says all things are OK .
    Of course I don`t use absolute url . Also I don`t know correct absolute url for my website .
    My website root is : http://www.mysite.com/web/ and Ajax XML Ticker related files are in this root :http://www.mysite.com/web/upload/Ajax/
    Now , what`s correct absolute url for my website . Please describe according to :var xmlfile=="http://"+window.location.hostname+"/subdir/tickercontent.txt"

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

    Default

    Assuming your XML file (which should actually be a text file) is called content.txt and located in the directory http://www.mysite.com/web/upload/Ajax/, the variable for the script would look like:

    Code:
    var xmlfile=="http://"+window.location.hostname+"/web/upload/content.txt"

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

    Default

    Do you mean :
    Code:
    var xmlfile=="http://"+window.location.hostname+"/web/upload/Ajax/content.txt"
    and what should I write instead of window.location.hostname .

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

    Default

    Ah yes, what you posted above. You shouldn't need to change window.location.hostname, as that's the dynamic part where JavaScript will replace with your actual domain, by probing the location bar of the browser.

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
  •