Shawn
09-24-2004, 03:03 AM
Ok, I'll skip most of my function and just show what's relevant to make this easier...
[script]
function openPlayer (playType,trackList) {
if (imHere) {
....do a bunch of stuff
}
else {
setTimeout("openPlayer"+playType+","+trackList+")",10)
}
}
Ok, here's the problem. I want that function to loop if the variable imHere isn't true. Easy enough, but if I pass a string for playType or trackList I get an error. Works fine when passing numbers but errors out every time I try to pass a string.
For instance let's say I pass the sring "play" to the playType variable. IE will throw this error:
ERROR: 'Play' is undefined
I have tried a number of things like having new variables set to the value of openPlayer/trackList and putting them in the setTimeout instead and it still errors. Basically the setTimeout calls an error whenever one of the variables I'm trying to pass to the function is not a number. If anyone is still up this late, I sure could use the help to get this project finished tonight....
[script]
function openPlayer (playType,trackList) {
if (imHere) {
....do a bunch of stuff
}
else {
setTimeout("openPlayer"+playType+","+trackList+")",10)
}
}
Ok, here's the problem. I want that function to loop if the variable imHere isn't true. Easy enough, but if I pass a string for playType or trackList I get an error. Works fine when passing numbers but errors out every time I try to pass a string.
For instance let's say I pass the sring "play" to the playType variable. IE will throw this error:
ERROR: 'Play' is undefined
I have tried a number of things like having new variables set to the value of openPlayer/trackList and putting them in the setTimeout instead and it still errors. Basically the setTimeout calls an error whenever one of the variables I'm trying to pass to the function is not a number. If anyone is still up this late, I sure could use the help to get this project finished tonight....