Note that there are some explanatory texts on larger screens.

plurals
  1. PO$find not working in firefox. ASP.NET Slideshow Extender
    primarykey
    data
    text
    <p>I have a asp.net ajax slideshow extender that I have hijacked and turned into a jquery like slide show control. It works wonderfully in every browser except for firefox. I have isolated the problem down to the $find call not working. Also I had to put in a setTimeout into the page to get pageLoad to call in firefox. This is also not necessary in chrome or IE.</p> <p>Here is the code.</p> <pre><code>setTimeout ( pageLoad(), 250 ); function pageLoad(){ var slider1; slider1 = $find('&lt;%= slExtender.BehaviorID %&gt;'); slider1.add_slideChanging(onSlideChanging); } function onSlideChanging(sender, args) { currentSlideIndex = args.get_slideIndex(); //Do what you want using this index var arr = &lt;%= serializer.Serialize(linkArray) %&gt;; for(var i = 0; i &lt; arr.length; i++) { if(i == currentSlideIndex) { var link = document.getElementById(arr[i]); link.className += "hovered"; } else { var link = document.getElementById(arr[i]); link.className = ""; } } } function SlideClicked(slID) { var ss = $find(slID); var arr = &lt;%= serializer.Serialize(urlArray) %&gt;; window.location = arr[ss._currentIndex]; } </code></pre> <p>It seems that the $find is returning null in firefox. Also, does anyway know why I have to put a timeout on the page to get pageload to call?.</p> <p>Also the $find in SlideClicked does work. slID is the slExtender.BehaviorID</p> <p><strong>Update</strong></p> <p>If I add </p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; </code></pre> <p>with the following javascript:</p> <pre><code>$(document).ready(function () { pageLoad(); }); function pageLoad(){ var slider1; slider1 = $find('&lt;%= slExtender.BehaviorID %&gt;'); slider1.add_slideChanging(onSlideChanging); } function onSlideChanging(sender, args) { currentSlideIndex = args.get_slideIndex(); //Do what you want using this index var arr = &lt;%= serializer.Serialize(linkArray) %&gt;; for(var i = 0; i &lt; arr.length; i++) { if(i == currentSlideIndex) { var link = document.getElementById(arr[i]); link.className += "hovered"; } else { var link = document.getElementById(arr[i]); link.className = ""; } } } function SlideClicked(slID) { var ss = $find(slID); var arr = &lt;%= serializer.Serialize(urlArray) %&gt;; window.location = arr[ss._currentIndex]; } </code></pre> <p>To the page, everything works fine in firefox and no longer works in chrome or IE. I already have 1.4.1 included on the masterpage.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload