PDA

View Full Version : AJAX ROTATING INCLUDES SCRIPT (Dec 14/05 updated)



rvrg
02-23-2006, 12:11 AM
Struggling to get this to work on my index page. Thought maybe conflict with other scripts on the page, so put up a page with this script only on it. GRR..still doesn’t work! If anyone could take a look at the page source for a clue, would be most appreciated. http://www.rvrg.com/Q2Q.html
I am trying to generate random quotes. For each quote I made a separate .html file (labelled file1.html, file2.html, etc.) & put them into a folder (files_array) in the httpdocs. Big thanks in advance for any assistance!

DD script link http://www.dynamicdrive.com/dynamicindex17/ajaxrotate.htm

ddadmin
02-23-2006, 01:14 AM
.

I do see an error with your configuration, at the line:


var rootdomain="http://"rvrg.com/files_array"

There's an extra double quotes in your URL. It should read:


var rootdomain="http://rvrg.com/files_array"

I'm not sure if this is the only error, but try fixing it first.

rvrg
02-23-2006, 12:20 PM
Thanks for taking the time to scrutinize the script. I have corrected & loaded the page up again, but no luck. I am wondering if I have incorrectly named the folder holding the files?

rvrg
02-24-2006, 10:10 PM
Help please!
I am trying to generate random quotes to appear on my index page. Thought other javascript on the page might be conflicting, so have made testing page http://www.rvrg.com/Q4Q.html
When it is working (!) will transfer the corrected code to the index page. For each quote, I created a separate .html page & these pages are within a folder, http://www.rvrg.com/ajaxfiles
The quote pages are http://www.rvrg.com/ajaxfiles/file1.html, http://www.rvrg.com/ajaxfiles/file2.html, http://www.rvrg.com/ajaxfiles/file3.html, etc. There are 14 file pages.
Everything has been loaded up, nothing is working, assistance would be MOST appreciated.

ddadmin
02-25-2006, 02:01 AM
Ok, I see a couple of ther basic errors. Firstly, inside the line:


var includefiles=[...."files_array/file50.html",]

The very last entry should NOT contain an comma at the end! In other words, it should read:


var includefiles=[...."files_array/file50.html"]

Then, for the line:


url=files_array[http:www.rvrg.com]

It should read:


url=files_array[url]

rvrg
02-25-2006, 10:40 AM
Thank you. Made the corrections, but still problems. I have TWO test pages loaded:
#1
http://www.rvrg.com/Q2Q.html (with files named http://www.rvrg.com/files_array/file1.html, http://www.rvrg.com/files_array/file2.html, etc. in folder http://www.rvrg.com/files_array). There are 50 files in the folder.
#2
http://www.rvrg.com/Q4Q.html (with files named http://www.rvrg.com/ajaxfiles/file1.html, http://www.rvrg.com/ajaxfiles/file2.html, etc. in folder http://www.rvrg.com/ajaxfiles). There are 14 files in the folder.

I created Q4Q because I thought perhaps I had made a mistake naming the files.
Now, Q4Q is sort of working BUT showing the same quote many, many times, and always the same quote (file6). Please take a look http://www.rvrg.com/Q4Q.html

I have made your corrections to both Q2 and Q4 & reloaded them on my site. I have checked in different browsers, reloaded, cleared cache, etc. Also, viewed page source to make sure that I was viewing most recent upload.
PS - Did you notice my FAVICON on the site? Thank you for providing that great little visual, although must add to other posters that it did seem to take forever for it to appear. Patience..sigh! Seems to be a key ’design skill’.

rvrg
02-26-2006, 03:02 AM
HOORAY! Finally works. The problem was in my file pages. Funny because that was my first guess. Anyway, the quotes are up & running on my index page with just a little cosmetic tweaking left to do. Anyone care to admire? http://rvrg.com

to DDadmin:THANKS for help over the past few days:)

ddadmin
02-26-2006, 01:13 PM
Hi:
Glad it works :) However, in IE, I still get a few JS errors that pop up. I'm not sure which script on your page is causing it, as there are a few of them. You may want to remove any unnecessary JavaScripts on that page.