Results 1 to 2 of 2

Thread: Javascript Error: Object required line 71

  1. #1
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Javascript Error: Object required line 71

    1) Script Title:
    Virtual Pagination script v2.0
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...pagination.htm
    3) Describe problem:

    Javascript Error: Object required line 71 Char 2

    Code:
    <div id="tcontent1" class="tabcontent">
    <div id="gallerypaginate2" class="paginationstyle"></div>
    
    <div style="width: 300px;">
    
    <div class="virtualpages hidepiece">
    <img name="curry" src="images/curry.png" width="700" height="375" border="0" id="curry" usemap="#m_curry" alt="" /><map name="m_curry" id="m_curry">
    <area shape="rect" coords="650,39,690,342" href="javascript:gallerys.navigate(1)" alt="" />
    </map>
    </div>
    
    <div class="virtualpages hidepiece">
    <img name="curry2" src="images/curry2.png" width="700" height="375" border="0" id="curry2" usemap="#m_curry2" alt="" /><map name="m_curry2" id="m_curry2">
    <area shape="rect" coords="650,39,690,342" href="javascript:gallerys.navigate(0)" alt="" />
    </map>
    </div>
    
    <script type="text/javascript">
    
    var gallerys=new virtualpaginate2({
    	piececlass2: "virtualpages", //class of container for each piece of content
    	piececontainer2: 'div', //container element type (ie: "div", "p" etc)
    	pieces_per_page2: 1, //Pieces of content to show per page (1=1 piece, 2=2 pieces etc)
    	defaultpage2: 0, //Default page selected (0=1st page, 1=2nd page etc). Persistence if enabled overrides this setting.
    	persist2: false //Remember last viewed page and recall it when user returns within a browser session?
    })
    
    gallerys.buildpagination2(["gallerypaginate", "gallerypaginate2"])
    
    </script>
    
    </div>
    Last edited by Snookerman; 05-05-2009 at 02:40 PM. Reason: added [code] tags and fixed title

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

    Default

    There may be other issues, but just based on the above code, you shouldn't be changing the individual setting variable names, even if you're displaying multiple instances of the script on a page. In other words, the parts in red below should be removed:

    Code:
    var gallerys=new virtualpaginate2({
    	piececlass2: "virtualpages", //class of container for each piece of content
    	piececontainer2: 'div', //container element type (ie: "div", "p" etc)
    	pieces_per_page2: 1, //Pieces of content to show per page (1=1 piece, 2=2 pieces etc)
    	defaultpage2: 0, //Default page selected (0=1st page, 1=2nd page etc). Persistence if enabled overrides this setting.
    	persist2: false //Remember last viewed page and recall it when user returns within a browser session?
    })
    
    gallerys.buildpagination2(["gallerypaginate", "gallerypaginate2"])
    Please review the demo code on the script page again for the proper syntax.
    DD Admin

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
  •