I would like to call a function with parameters, i.e. multiply('2','3','box1').
In this example, the first argument would be multiplied with the second and written into the div with the id="box1".
My question:
How can I set a default value for the third argument? => so if I call multiply('2','3') then it should automatically set the output-variable to 'box1' if not other defined in the call.
I'm sure that this is possible but I unfortunately can't find anything about default values neither in this forum nor with google...
Hello
Thank you for your answer. I've tried to apply it for my function. There is good news and bad news for me:
good news: if targetDiv is not set, then it sets the value to "calendar". that's nice :o)
bad news: if targetDiv is set, it overwrites the value with "calendar".
=> I've used the alerts to give out the values before and after the default settings...
Bookmarks