A
andreyvul
I'm using Firefox's Web Development toolbar and it whines about
function bar() not found:
<html>
<head>
<script type='"text/javascript">
function foo() {
document.write("<input type=\"button\" value=\"bar\" onclick=
\"bar();\">");
}
function bar() {
}
</script>
</head>
<body>
<input type="button" value="baz" onclick="foo();" />
</body>
</html>
Any clue on how to fix it without inlining the contents of bar()
inside the onclick of the button generated by foo()?
function bar() not found:
<html>
<head>
<script type='"text/javascript">
function foo() {
document.write("<input type=\"button\" value=\"bar\" onclick=
\"bar();\">");
}
function bar() {
}
</script>
</head>
<body>
<input type="button" value="baz" onclick="foo();" />
</body>
</html>
Any clue on how to fix it without inlining the contents of bar()
inside the onclick of the button generated by foo()?