Christopher Oliver wrote:

Try this:

function checkLogin(funarg) {
     if (user == null) {
          login();
          this[funarg]();
     }
}
Thanks, it worked! While you're at it, would it be possible to pass arguments to "funarg", by defining them in the sitemap? I mean:

<map:call function="checkLogin">
<map:parameter name="funarg" value="protected"/>
<map:parameter name="arg1" value="somevalue"/>
<map:parameter name="arg2" value="someothervalue"/>
</map:call>

function checkLogin(funarg, ???) {
if (user == null) {
login();
this[funarg](???);
}
}

What should I put in place of the question marks? Assume that the number of arguments is variable. Pardon my Javascript ignorance and thanks again ;-).

Ugo

--
Ugo Cei - http://www.beblogging.com/blog/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to