View Single Post
  #7 (permalink)  
Old Jul 26th, 2007, 12:38
MikeHopley MikeHopley is offline
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problem: onClick Function

Quote:
Originally Posted by mihirc View Post
And after using ur suggested correction,
I came across this error...

document.getElementById("submit") has no properties


Sorry For Putting you through all this trouble...

mihir.
Ah ha!

I think that means it's failing to find the element with that ID. Not sure why this is happening, but at least you can add an object detect to avoid the error:

Code: Select all
var x = document.getElementById("submit")
if (x) {
x.onclick=function(){mailIt(this.form); document.mailform.captchastring.value=(''); return checkForm();}
}

This may not actually make it work, but at least it will stop the error message (for pages that lack this element).
Reply With Quote