Dynamic Functions
Posted: Sun Jul 27, 2003 8:51 pm
This is probably a question for the more 'advanced' users of JavaScript.
How would I go about adding new lines of code to a JavaScript function?
Let's say I had this function...
function alertnames()
{
alert('Bob');
alert('Charlie');
}
... and I wanted to add ... alert('David') ... to that function.
I'm not worried about it working on any browser apart from IE5+ so if it doesn't work on NS no problem.
I'm sure the new Microsoft DOM for IE5+ allows you to do this and I've been going through the Microsoft website but haven't found anything yet.
Any help on this would be really cool.
Thanks.
How would I go about adding new lines of code to a JavaScript function?
Let's say I had this function...
function alertnames()
{
alert('Bob');
alert('Charlie');
}
... and I wanted to add ... alert('David') ... to that function.
I'm not worried about it working on any browser apart from IE5+ so if it doesn't work on NS no problem.
I'm sure the new Microsoft DOM for IE5+ allows you to do this and I've been going through the Microsoft website but haven't found anything yet.
Any help on this would be really cool.
Thanks.