Hi again also Sheldon,

yes, I thought that was what was happening in the function.

Would you know a way to only display the actual image index number for each image that is displayed?

Kind regards..,

MT

----------

On 23/03/2011 07:27, Sheldon Neilson wrote:
Hi again MT.

      " function myFeedHandler(result, transitionTime) {
                var imNum = document.getElementById("index");
         var ImIndex = result.feed.entries;
         for (var i=0; i<ImIndex.length + 1; ++i) {
                 imNum.innerHTML = i;
        }
        }"

When your myFeedHandler method is called, this loop will run ImIndex.length
times at the blink of an eye. Therefore the only thing that will persist on
your screen  is the last value of i.

SHELDON NEILSON
Manager: Systems Development

Equidem Management Sciences (Pty) Ltd, 2nd Floor, Lancaster Gate, Hyde Park
Lane, Hyde Park, Sandton, 2196
Mobile: +27 71 895 0326, Tel: +27 11 325 1960, BB Pin: 22056627, Email:
[email protected].
A member of Weben Partners

Equidem Management Sciences Electronic Mail Disclaimer
This message (including any attachments) is intended solely for theperson(s)
to whom it is addressed ("intended recipient"). It may contain copyright,
confidential and/or privileged information, within the meaning of applicable
law. If you are not the intended recipient (or do not have authority to
access the intended recipient's mail box) any disclosure, dissemination,
distribution or copying of this e-mail or any attached documents is strictly
prohibited.
If you are not the intended recipient, please contact the sender or Equidem
Management Sciences (the "Company") as soon as possible and delete this
e-mail and all attachments immediately. Information, opinions or statements
in this e-mail are not necessarily those of the Company. If you are in any
doubt as to whether the opinions or statements in this e-mail are made on
behalf of the Company, please contact: [email protected].
Equidem Management Sciences does not accept liability for any claims, loss
or damages of whatsoever nature, arising as a result of the reliance on such
information, opinions or statements by anyone.



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of MadTogger
Sent: 22 March 2011 04:49 PM
To: Google AJAX APIs
Subject: fullControlPanelCursor Replacement

Hi,

as I have made custom nav controls for my slideshow that are situated
in a div below the slideshow itself and I have managed to extract the
image titles from my Atom feed, I am now trying to get a display of
the actual image index.

I am trying to produce the same effect as the standard
'fullControlPanelCursor', i.e.

Image n of n.

I have found a piece of code that uses the 'feedProcessedCallback'
function, not sure whether it is the correct procedure or not.

My code is this:-

function myFeedHandler(result, transitionTime) {
        var imNum = document.getElementById("index");
        var ImIndex = result.feed.entries;
        for (var i=0; i<ImIndex.length + 1; ++i) {
        imNum.innerHTML = i;}
        }

As you can see, I have used  'transitionTime' within the function to
allow the text to be updated on each image change.

Currently, this code only displays the total number of images in the
feed i.e. 20 and outputs this figure to a div with the id 'index'.

How can I change this so that it actually shows '1 of 20', for the
first image, '2 of 20', for the second etc.. etc..

Kind regards..,

MT


--
You received this message because you are subscribed to the Google Groups "Google 
AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en.

Reply via email to