This content has been marked as final.
Show 8 replies
-
1. Re: Gallery Question
Donald Booth Jun 28, 2006 10:58 PM (in response to heathrowe)Sure.
Under your data set declaration, add:
dsPhotos.setCurrentRow('1');
or whatever you want the default row to be...
Hope this helps.
Don -
2. Re: Gallery Question
heathrowe Jun 29, 2006 4:14 AM (in response to Donald Booth)Hi Donald, thanks for the heads up.
I saw that use in the examples, but they all used in conjunction with a onChange event.
Since I want to load the array onloading (automatically) and not have to be triggered/fired off by an event, what notation do I use in your example to get it to work? -
3. Re: Gallery Question
heathrowe Jun 30, 2006 4:38 AM (in response to heathrowe)Can you verify that I have the dsPhotos.setCurrentRow('1'); in the correct location?
I tried placing it in various locations, but it still dosn't change the default array initial count from 0 to 1.
Gallery Here -
4. Re: Gallery Question
heathrowe Jul 1, 2006 9:08 AM (in response to heathrowe)Anyone know how to implement donalds suggestion?
Still can't figure out setting the array to 0 onpage load.
h -
5. Re: Gallery Question
Newsgroup_User Jul 2, 2006 4:06 PM (in response to heathrowe)Reading some threads on this forum, I found this fix for starting the
numbering at 1 posted by ::Andy. (Seems it's not possible to do as of
yet without editing SpryData.js, though I'm sure it's coming in the future.)
ds_RowNumber starting at zero
-------------------------------------------
Added {ds_RowCounter} in sprydata.js to get round the problem of
displaying 0
when listing items. I have tried not to modified the
sprydata.js as I don't want to be in position as not to easily
upgrade. But I
could'nt find anyway around this with something
like {ds_RowNumber+1} for example.
Line 2098 sprydata.js -
if (token.data == "ds_RowNumber")
outputStr += dsContext.getRowIndex();
else if (token.data == "ds_RowCount")
outputStr += dsContext.getNumRows();
else if (token.data == "ds_RowCounter")
outputStr += dsContext.getRowIndex()+1;
else
{
var curDataSetRow = dsContext.getCurrentRow();
if (curDataSetRow)
outputStr += curDataSetRow[token.data];
}
heathrowe wrote:
> Anyone know how to implement donalds suggestion?
>
> Still can't figure out setting the array to 0 onpage load.
>
> h -
6. Re: Gallery Question
heathrowe Jul 2, 2006 5:04 PM (in response to Newsgroup_User)thanks imagic for finding that for me, though that particular area is in adifferent location in the latest build of that file, with it implemented it still didn't bring change.
But thanks for pointing me in the direction - I may have to play with some lines here to try and figure it out.
h -
7. Re: Gallery Question
kinblas Jul 5, 2006 9:38 AM (in response to heathrowe)Hi heathrowe,
Did you change your HTML code to use {ds_RowCounter} after you made that JS change?
Are you using {ds_RowCounter} in a spry:if or spry:test attribute? Or in HTML content?
--== Kin ==-- -
8. Gallery Question
heathrowe Jul 5, 2006 5:25 PM (in response to kinblas)Ah - thanks Kin, that was the direction I needed.
I neglected to change the ds_rowid to ds_RowCounter, as originally suggested.
It introduces new issues to my scheme, but thats ok for now - glad to get that sorted out.
h




