How to get rid of the windows internet explorer page error?

I wrote a simple form using javascript to collect feedback via email. It normally works and brings up the new email form ready to be sent. However, once it is loaded, on the bottom left of the html page , I have noticed a yellow triangle /  a warning icon with a ! sign in it "error on the page" or "Done" message. Once I double clicked that triangle, it indicates that I had a problem at Line 70 Char 1 Error" "Object expected" Code: 0 I went over the script, I was unable to find anything major at line 70, yet the script seems like working. How can I get rid of that yellow triangle with error message: "Problems with this web page might prevent it from being displayed properly ....etc? Can you check my script and show me what I missed or didn't see?
Secondly: Everytime the form is submitted, the internet explorer generates message saying "This form is being submitted using email.....etc, How can I get rid of this message? Is there any specific javascript code to be added in the page? Please see my script
Thanks for your help, God Bless
<HTML>
<HEAD>
 
<SCRIPT LANGUAGE="JavaScript">
 
 
<!-- Begin
 
function leaptoIntro() {
window.location="http://yahoo.com"
}
 
 
function submitForm() {
if ( (isName()) && (isSuggestion()) && (isRole()) ) {
if (confirm("\nYour submission is about to be sent.\n\nClick YES to submit.\n\nClick NO to cancel.")) 
return true
else
return false;      
}
else
return false;
}
 
function isName() {
var str = document.forms[0].elements[1].value;
if (str == "") {
alert("\nThe NAME field is blank.\n\nPlease enter your name.")
document.forms[0].elements[1].focus();
return false;
}
for (var i = 0; i < str.length; i++) {
var ch = str.substring(i, i + 1);
if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && ch != ' ') {
alert("\nThe NAME field only accepts letters & spaces.\n\nPlease re-enter your name.");
document.forms[0].elements[1].select();
document.forms[0].elements[1].focus();
return false;
   }
}
return true;
}
 
function isRole() {
var str = document.forms[0].elements[2].value;
if (str == "") {
alert("\nThe Role field is blank.\n\nPlease enter your role.")
document.forms[0].elements[2].focus();
return false;
}
else
return true;
}
 
function isSuggestion() {
var str = document.forms[0].elements[3].value;
if (str == "") {
alert("\nThe SUGGESTION field is blank.\n\nPlease enter your suggestion.")
document.forms[0].elements[3].focus();
return false;
}
else
return true   
}
// End -->
 
</SCRIPT>
 
 
<BODY onLoad="Reset()">
 
<CENTER>
<FORM ENCTYPE="text/plain" NAME="test" METHOD='POST' ACTION='mailto:someone@some.com?subject= Support Feedback' onSubmit="return submitForm()">
<INPUT TYPE ="hidden" NAME = "Form Request" VALUE = " Suggestions">
<TABLE BORDER=0 WIDTH=564>
<TR>
<TD align="center"> <FONT><STRONG>Enter your name:</STRONG></FONT>
<TD align="center"> <FONT><STRONG>Your Role:</STRONG></FONT>
</TR>
<TR>
<TD align="center"> <INPUT TYPE = "text" NAME = "Name"   SIZE=26 MAXLENGTH=40>
<TD align="center"> <INPUT TYPE = "text" NAME = "Role"   SIZE=26 MAXLENGTH=40>
</TR>
</TABLE>
<BR>
<TABLE BORDER=0>
<TR>
<TD align="center"> <FONT><STRONG>Enter your Feedback: </STRONG></FONT>
</TR>
<TR>
<TD align="center"><TEXTAREA NAME = "Suggestions" ROWS=2 COLS=55 wrap=yes></TEXTAREA>
</TR>
</TABLE>
<BR><BR>
<TABLE BORDER=0 WIDTH=300>
<TR>
<TD align="center"><INPUT TYPE="submit" VALUE="Submit">
<TD align="center"><INPUT TYPE="reset" VALUE="Reset" onClick="Reset()">
 
<TD align="center"><INPUT NAME="update" TYPE="BUTTON" VALUE="Close" OnClick="leaptoIntro()">
</TR>
</TABLE>
</FORM>
</CENTER>
</HTML>

Open in new window

edeita2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

quincydudeCommented:
You are missing the reset() function in the code, or are you trying to reset the form? You have to use
<BODY onLoad="document.test.reset();">

The same applies to the reset button.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MMDeveloperCommented:
this is bad programming practice, try this code and see what happens
function leaptoIntro() {
	window.location="http://yahoo.com";
}
 
 
function submitForm() {
	if ( (isName()) && (isSuggestion()) && (isRole()) ) {
		if (confirm("\nYour submission is about to be sent.\n\nClick YES to submit.\n\nClick NO to cancel.")) {
			return true;
		}
		else {
			return false;
	}
	else {
		return false;
	}
}
 
function isName() {
	var str = document.forms[0].elements[1].value;
	var regExp = /[^a-zA-Z ]/;
	
	if (str == "") {
		alert("\nThe NAME field is blank.\n\nPlease enter your name.");
		document.forms[0].elements[1].focus();
		return false;
	}
	if (regExp.test(str)) {
		alert("\nThe NAME field only accepts letters & spaces.\n\nPlease re-enter your name.");
		document.forms[0].elements[1].select();
		document.forms[0].elements[1].focus();
		return false;
	}
	return true;
}
 
function isRole() {
	var str = document.forms[0].elements[2].value;
	if (str == "") {
		alert("\nThe Role field is blank.\n\nPlease enter your role.");
		document.forms[0].elements[2].focus();
		return false;
	}
	else {
		return true;
	}
}
 
function isSuggestion() {
	var str = document.forms[0].elements[3].value;
	if (str == "") {
		alert("\nThe SUGGESTION field is blank.\n\nPlease enter your suggestion.");
		document.forms[0].elements[3].focus();
		return false;
	}
	else {
		return true
	}
}

Open in new window

0
MMDeveloperCommented:
sorry typo
function leaptoIntro() {
	window.location="http://yahoo.com";
}
 
 
function submitForm() {
	if ( (isName()) && (isSuggestion()) && (isRole()) ) {
		if (confirm("\nYour submission is about to be sent.\n\nClick YES to submit.\n\nClick NO to cancel.")) {
			return true;
		}
		else {
			return false;
		}
	}
	else {
		return false;
	}
}
 
function isName() {
	var str = document.forms[0].elements[1].value;
	var regExp = new RegExp("/[^a-zA-Z ]/", "g");
	
	if (str == "") {
		alert("\nThe NAME field is blank.\n\nPlease enter your name.");
		document.forms[0].elements[1].focus();
		return false;
	}
	if (regExp.test(str)) {
		alert("\nThe NAME field only accepts letters & spaces.\n\nPlease re-enter your name.");
		document.forms[0].elements[1].select();
		document.forms[0].elements[1].focus();
		return false;
	}
	return true;
}
 
function isRole() {
	var str = document.forms[0].elements[2].value;
	if (str == "") {
		alert("\nThe Role field is blank.\n\nPlease enter your role.");
		document.forms[0].elements[2].focus();
		return false;
	}
	else {
		return true;
	}
}
 
function isSuggestion() {
	var str = document.forms[0].elements[3].value;
	if (str == "") {
		alert("\nThe SUGGESTION field is blank.\n\nPlease enter your suggestion.");
		document.forms[0].elements[3].focus();
		return false;
	}
	else {
		return true
	}
}

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

quincydudeCommented:
Well, I think using multiple returns is also a bad practise.
0
MMDeveloperCommented:
I agree, I just didn't want to re-engineer it all :P
0
edeita2Author Commented:
quincydude, what do you think about my 2nd question:when form is submitted, the dialog appears and says:(Microsoft Internet Explorer)
"This form is being submitted using email.
Submitting this form will reveal your email address to the recipient and will send the form data without encrypting it for privacy.
You may continue or cancel this submission." is there any way to avoid this or is it simply browser settings?
0
quincydudeCommented:
For the second question, it's a IE security setting and can fixed by adjusting the preferences. However, you do not have the rights to adjust your users setting, so everyone will be able to see it anyway,
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.