Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 2nd, 2007, 05:08 AM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default xslt: pass index of array

Hey,

I would like to do something like this in my xslt file
Code:
<div onclick="javascript:manager.prototype.list[{$index}].toggleC();"></div>
Viewing my DOM in IE6, onClick contains manager.prototype.list[0].toggleC();

But when clicking on the DIV, I get following error : manager.prototype.list.0 does not exist

What am I doing wrong?

Thanks and kr.
 
Old July 2nd, 2007, 06:31 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Thers's nothing intrinsically wrong with the XSLT, $index was zero so you try to access the first element in the list array. This doesn't exist in the web page.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Index was outside the bounds of the array ECPcenter ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2008 04:55 AM
Returning the Index number of an array prusila Java Basics 1 February 13th, 2007 05:54 AM
Index was outside the bounds of the array dba123 Reporting Services 0 March 6th, 2006 11:25 AM
Select Box: Pass Literal instead of Index WebDevel Javascript How-To 5 September 12th, 2005 11:42 AM
Array index rajanikrishna Beginning PHP 1 December 3rd, 2003 02:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.