Results 1 to 8 of 8
03-10-2003, 12:47 PM #1
Alternative to .caller or ??? for .js sub-routines?
Is there an alternative to the NN 6 deprecated .caller or ?another? method of calling a function within a .js file that will gather a value and either return it or pass it along to another function?
In other words, something like the BASIC SUB function - don't know what it is in C or C++ if they have it.
03-10-2003, 01:51 PM #2
Thing to watch with them is that the variables are accessible to both the outer and inner functions, probably best to make them global.
Is this what you mean? if I am on the right track, I'll post some examples.
03-10-2003, 02:02 PM #3
Yes, I figured the process would involve threading through various <SCRIPT ...>s, accumulating variables and passing them along to the final <SCRIPT ...> and, yes, a simple example would help. (Mine will be included within a master .js file that includes all the functions being accessed.)
03-10-2003, 02:30 PM #4
Here you go. It also demonstrates local, global and passed variables.
Edit: To disable smilies. A surprised face in code never works, it just makes people worry about you :)
03-10-2003, 04:02 PM #5
Thanks, again, as usual - you da man, QD!
The process has been incorporated into http://Test.Gumint.com toward the bottom of the page as passing variables (function to function).
03-10-2003, 04:47 PM #6
Nice! I like the explanatory error. I shoulda thought of it, but I'm lazy
03-10-2003, 06:38 PM #7
Lazy?! Hah! You're the 2nd hardest working person in these forums - we all know who's at top of that heap (and it ain't me.)
03-10-2003, 11:17 PM #8