PDA

View Full Version : Image Crawler and PHP results



ddoscher
04-26-2012, 07:39 PM
1) Script Title: Image Crawler 1.5

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/crawler/index.htm

3) Describe problem: I am using a PHP script to populate the Image Crawler with images from an sql database. This works great in Firefox, however IE does not seem to like it. It returns 'object required' errors in the crawler.js as well as the page the script is called on. I have been pouring over the scripts and pages for a few hours and can't get any traction on the problem... Any help would be greatly appreciated!!!:) Here is the site http://www.rockypointshopper.com

jscheuer1
04-27-2012, 12:24 AM
The one thing that jumps out at me is that the on page init comes before the content that it initializes:


<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
//'padding': '0px',
'width': '800px',
'height': '255px',
'background': '#000000',
//'border': '0px solid #CC3300',
//'vertical-align': 'bottom',
'color': '#fff',
'background-color':'#fff',
'font-family': 'sansserif'
//'margin': '0 auto'
},
inc: 18, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true,
stopped: true,
stopMarquee: true
});
</script>
<div id="apDiv8"></div>
<div id="apDiv15">
<div id="apDiv17">
<div class="marquee" id="mycrawler2">
<a href="lst_dtl.php?uid=0"><img src="images/welcome.jpg" align="bottom"></a><a href="lst_dtl.php?uid=2"><img src="images/mainstreet2.jpg" align="bottom"></a><a href="lst_dtl.php?uid=3"><img src="images/mainstreet3.jpg" align="bottom"></a><a href="lst_dtl.php?uid=4"><img src="images . . .

Which is the reverse of how it's supposed to be. So I'm surprised it works in any browser.

Since PHP and a database are involved making it difficult for me to set up a true local version, let's just try something and see what happens.

Move the init:


<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
//'padding': '0px',
'width': '800px',
'height': '255px',
'background': '#000000',
//'border': '0px solid #CC3300',
//'vertical-align': 'bottom',
'color': '#fff',
'background-color':'#fff',
'font-family': 'sansserif'
//'margin': '0 auto'
},
inc: 18, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true,
stopped: true,
stopMarquee: true
});
</script>

to the very last thing before the closing </body> tag.

The browser cache may need to be cleared and/or the page refreshed to see changes.