M
mike_solomon
I am trying to use prototype.js to log javascript errors among other
things but by including
<script type="text/javascript" src="prototype.js"></script> in my
page some of my existing javascript no longer works
for example
function submitAction(form,newaction,hiddenName,hiddenValue) {
form.action=newaction;
//alert(mike.ADMUSER.value);
for ( i in hiddenName) {
var x = form[hiddenName]
x.value = hiddenValue;
}
//form.submit();
alert(x.value)
}
This is called in the page like so:
<form name="main" method="post">
<a href="#" onClick="submitAction(document.main,'menuforms.php',
['EVENT'],['bttf07'])">BTTF</a>
<input type="hidden" name="EVENT">
</form>
Can anyone explain why this gives me a Javascript error
Thanks
things but by including
<script type="text/javascript" src="prototype.js"></script> in my
page some of my existing javascript no longer works
for example
function submitAction(form,newaction,hiddenName,hiddenValue) {
form.action=newaction;
//alert(mike.ADMUSER.value);
for ( i in hiddenName) {
var x = form[hiddenName]
x.value = hiddenValue;
}
//form.submit();
alert(x.value)
}
This is called in the page like so:
<form name="main" method="post">
<a href="#" onClick="submitAction(document.main,'menuforms.php',
['EVENT'],['bttf07'])">BTTF</a>
<input type="hidden" name="EVENT">
</form>
Can anyone explain why this gives me a Javascript error
Thanks