942,967 Members | Top Members by Rank

Ad:
Mar 20th, 2010
0

Javascript not working in IE

Expand Post »
I write javascript for image slide show.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1.  
  2. var mygallery=new fadeSlideShow({
  3. wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
  4. dimensions: [380, 469], //width/height of gallery in pixels. Should reflect dimensions of largest image
  5. imagearray: [
  6. <?php $q2 = mysql_query("select * from home_flash");
  7. $i = 0;
  8. while($res = mysql_fetch_array($q2))
  9. {
  10. $image[$i] = $res[1];
  11. $text[$i] = $res[2];
  12. $str = "['images/fla/".$image[$i]."','','','".$text[$i]."'],";
  13. echo $str;
  14. $i++;
  15. } ?>
  16.  
  17. //<--no trailing comma after very last image element!
  18. ],
  19. displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
  20. persist: false, //remember last viewed slide and recall within same session?
  21. fadeduration: 500, //transition duration (milliseconds)
  22. descreveal: "always",
  23. togglerid: ""
  24. })

In IE I got an error

Quote ...
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2)
Timestamp: Sat, 20 Mar 2010 06:22:10 UTC

Message: 'imagearray[...].0' is null or not an object
Line: 37
Char: 3
Code: 0
If you have solution for thi, then please help with it!

Thanks for your precious time.

Cheers!!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Jeyush is offline Offline
10 posts
since Sep 2009
Mar 20th, 2010
0
Re: Javascript not working in IE
Jeyush,

More info needed.
  1. From which library is fadeSlideShow?
  2. Can you post the as-served javascript rather than the php source?
  3. At what stage do you get the javascript error; on page load or when the fader executes?
  4. You imply that the error only occurs in IE. Is this the case and if so, which version(s) of IE?
Airshow
Sponsor
Reputation Points: 299
Solved Threads: 356
WiFi Lounge Lizard
Airshow is online now Online
2,515 posts
since Apr 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: JS character counter to 'double' certain characters?
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: form validation





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC