... Just thought maybe you guys would know some more about scripting, that's why I'm asking you guys this regardless of it being a Captivate question because the Captivate Specialists couldn't answer my question being clueless about the scripting part of it.
Are you (and with you those "Captivate Specialists") aware of the fact that
var slideNumber = URL.substring(startIndex);
will return a text string, not a number? And so this next operation will (silently) fail, and return some default number instead (most likely, 0)?
(stuff --) requestedSlide - 1
If you already knew this, you will have to be more clear on what happens now, what you'd like to happen, and what Captivate actually is supposed to do (since I have no idea what it is).
Well you did help me more than anyone else confirming a problem with the java script itself, and you are right that no one knew that startindex = 0. So, it sounds like the variable "startindex" is supposed to be something different that will be placed in the variable "slideNumber"? and that variable "startindex" is supposed to be the secret code in the script I'm supposed to find from the slide number in the other project I'm trying to jump to or is it easier than that where I'm just supposed to put in a certain code that is known by the java script specialists? I'm sorry if this doesn't make sense, I have yet to have true experience in scripting obviously by the way I describe this problem.
and that variable "startindex" is supposed to be the secret code in the script I'm supposed to find from the slide number in the other project I'm trying to jump to or is it easier than that where I'm just supposed to put in a certain code that is known by the java script specialists? I'm sorry if this doesn't make sense, I have yet to have true experience in scripting obviously by the way I describe this problem.
Your sentence is hard to understand, but it is not because of your unfamiliarity with scripting.
Can you please rewrite the above paragraph with smaller shorter sentences?
Please read it and make sure it makes sense. Because I'm having a lot of trouble.
The variable going in is of type "string", and I'm 100% sure of that because you are using the function "substring" to create its argument. I'm that sure because "substring" will always return a string, even when you feed it a boolean or an integer (in those cases it will return an empty string, but that's still a string -- kind of like the number 0 may represent 'nothing at all', but it's still a number).
cpObj.cpEISetValue('cpCmndGotoSlide',parseInt(requestedSlide) - 1);
Needless to say I'm not 100% sure this will fix the problem, because I cannot test your code using InDesign.
Your a genious! worked to perfection!