Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Frontpage 2003 Won't Validate Form Field


  • Please log in to reply
8 replies to this topic

#1 Leslie138

Leslie138

  • Members
  • 33 posts
  • OFFLINE
  •  
  • Local time:04:45 PM

Posted 29 March 2008 - 12:58 PM

I'm using FrontPage 2003. Although I tell it to require an entry in the form field, it doesn't require it on the published website. I have tried to replace FrontPage "webbot" command with html, but I'm doing something wrong. Below is the code for the entire page - it is the "your e-mail address" I'm trying to validate. I have marked the line with asterisks. Thanks.

Leslie
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Contact Us</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Theme" content="blitz 1011, default">
<meta name="Microsoft Border" content="none, default">
</head>

<body>

<p>&nbsp;</p>
<div align="center">
	<table border="0" width="950">
		<tr>
			<td width="215" height="170" bgcolor="#FFFFFF" align="center" style="border-top: 7px ridge #0000FF">
<img border="0" src="smallpirate.jpg" width="127" height="115" style="background-color: #FFFF00"></td>
			<td>
			<p align="center"><b>
<font face="Signboard" size="6" color="#0066FF">Capt'n D's Tropical Adventures</font></b></p>
			<p align="center"><b><i><font face="Comic Sans MS" color="#0066FF">&quot;The only way to experience Costa 
Rica.&quot;</font></i></b></p>
			<p>&nbsp;</td>
			<td width="215" bgcolor="#FFFFFF" align="center" height="170" style="border-top: 8px ridge #0000FF">
			<img border="0" src="na00086a.gif" width="100" height="57"></td>
		</tr>
		<tr>
			<td width="215" height="415" bgcolor="#FFFFFF" align="center">
				<table border="0" width="80%" height="260">
					<tr>
						<td>
						<p align="center">
						<font face="Comic Sans MS" color="#FFFF00">
						<a style="color: #0066FF" href="index.htm">Home</a></font></td>
					</tr>
					<tr>
						<td>
						<p align="center">
						<font face="Comic Sans MS" color="#0066FF">
						<a href="contacts.htm"><font color="#0066FF">Contact Us</font></a></font></td>
					</tr>
					<tr>
						<td>
						<p align="center">
						<font face="Comic Sans MS" color="#0066FF">
						<a href="fishing_packages.htm"><font color="#0066FF">
						Fishing Packages</font></a></font></td>
					</tr>
					<tr>
						<td>
						<p align="center">
						<font face="Comic Sans MS" color="#0066FF">
						<a href="nature_packages.htm"><font color="#0066FF">
						Nature Activities</font></a></font></td>
					</tr>
					<tr>
						<td>
						<p align="center">
						<font face="Comic Sans MS" color="#0066FF">
						<a href="photo_gallery.htm"><font color="#0066FF">Photo 
						Gallery</font></a></font></td>
					</tr>
					<tr>
						<td>
						<p align="center">
						<font face="Comic Sans MS"><a href="about_capt'n_d.htm">
						<font color="#0066FF">About Capt'n D</font></a></font></td>
					</tr>
				</table>
				<p align="center">&nbsp;</td>
			<td valign="top" rowspan="2">
			<p style="margin-left: 15px; margin-right: 10px">
			&nbsp;</p>
			<p style="margin-left: 15px; margin-right: 10px">
			<font face="Comic Sans MS" color="#336600">For travel 
			arrangements or more information, contact</font></p>
			<p style="margin-left: 15px; margin-right: 10px">
			<font color="#336600">
			<font face="Comic Sans MS">David Segrave</font><br>
			<font face="Comic Sans MS">Professional 
			Consultants LLC<br>138 Vacation Lane</font><br>
			<font face="Comic Sans MS">Waveland, MS&nbsp; 
			39576</font>
			</font>
			<font face="Comic Sans MS"><font color="#336600"><br>(228) 467-5616 
			Office/Fax <br>e-mail </font><a href="mailto:dsegrave@bellsouth.net">
			<font color="#0066FF">dsegrave@bellsouth.net</font></a></font><font color="#0066FF">
			</font>
			<p style="margin-left: 15px; margin-right: 10px">
			<font color="#336600">
			<font face="Comic Sans MS">or send us your 
			inquiry below:</font>
			</font>
			<p style="margin-left: 15px; margin-right: 10px">
			<b><font size="4" color="#336600" face="Comic Sans MS">We can also 
			handle all of your international travel arrangements to and from 
			Costa Rica.</font></b><blockquote>
				<table width="373">
					<tr>
***<td ALIGN="right"><em>Your email address</em></td>
						<td>&nbsp;<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="2" --><input NAME="Contact_Email" SIZE="41">
						</td>
					</tr>
				</table>
			</blockquote>
			<p style="margin-left: 15px; margin-right: 10px">
			&nbsp;<div align="center">
				<table border="1" width="88%" height="278" style="border-left: 4px solid #000080; border-right: 4px solid #0000FF; border-top: 4px solid #000080; border-bottom: 4px solid #0000FF">
				<tr>
					<td align="center">
					<form method="POST" action="/cgi/formmail">
						<p style="margin-left: 15px; margin-right: 10px">
						<textarea rows="14" name="S1" cols="52"></textarea></p>
						<p style="margin-left: 15px; margin-right: 10px">
						<input type="submit" value="Submit" name="B3"><input type="reset" value="Reset" name="B4"></p>
						<input type="hidden" name="recipient" value="dsegrave@captndscostaricanvacations.com">
					</form>
					<p align="center">
					&nbsp;</td>
				</tr>
			</table>
			</div>
			<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<b><font face="Comic Sans MS" color="#336600" size="4">We accept 
			VISA, MC, DISC &amp; AMEX.</font></b></td>
			<td width="215" bgcolor="#FFFFFF">
			<img border="0" src="Picture%20017.jpg" width="211" height="155" style="border-left: 4px solid #000080; border-right: 4px solid #0000FF; border-top: 4px solid #000080; border-bottom: 4px solid #0000FF"><p>
			<img border="0" src="Costa%20Rica%201%20034.jpg" width="211" height="158" style="border-left: 4px solid #000080; border-right: 4px solid #0000FF; border-top: 4px solid #000080; border-bottom: 4px solid #0000FF"></td>
		</tr>
		<tr>
			<td width="215" height="415" bgcolor="#FFFFFF" align="center" style="border-bottom: 8px ridge #0000FF">
				<img border="0" src="bluesailfishleft.jpg" width="150" height="187"></td>
			<td width="215" bgcolor="#FFFFFF" align="center" style="border-bottom: 8px ridge #0000FF">
				<img border="0" src="bluesailfish.jpg" width="150" height="187"></td>
		</tr>
	</table>
	<p>&nbsp;</div>

</body>

</html>

Edited by groovicus, 30 March 2008 - 06:06 PM.


BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:45 PM

Posted 31 March 2008 - 08:30 AM

Just so I am clear, what code did you add that you think is going to validate the input? HTML has no validation capabilities. The line you commented out was (likely) a javascript function that checked to see if the information in the text field was valid.

#3 Leslie138

Leslie138
  • Topic Starter

  • Members
  • 33 posts
  • OFFLINE
  •  
  • Local time:04:45 PM

Posted 31 March 2008 - 12:38 PM

Yes, it was a javacript function. I found instructions on the site www.seoconsultants.com/frontpage/forms/validation/ and followed them exactly. However, it did not work. The instructions say to delete the "webbot" command and add an external reference to a javascript function, among other things. I am truly at a loss as to how to make the e-mail address required, although I see it all the time. Any suggestions? Thanks.

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:45 PM

Posted 31 March 2008 - 01:01 PM

The instructions say to delete the "webbot" command and add an external reference to a javascript function


Right. Where did you add the reference to the external javascript function? You have no external javascript page defined anywhere, and you have no script anywhere that will do the validation.

I'm not sure if this example will help or not:
http://www.w3schools.com/js/js_form_validation.asp

#5 Leslie138

Leslie138
  • Topic Starter

  • Members
  • 33 posts
  • OFFLINE
  •  
  • Local time:04:45 PM

Posted 31 March 2008 - 02:39 PM

I reverted back to the way Frontpage code looked originally and so removed all the changes before I sent my first inquiry so that you could see the starting point.
I have now followed the example in the link you sent (thanks for the link) and tried it both with and without the reference to the external source (neither worked) and am attaching the new code below.
My first very basic question is, if I follow the script in the example, do I still need to reference the external source?
I can't tell if the submit button is referring to the email field or the comment field. Is it time for me to start over on the form and re-send the code for you to look at? Thanks.

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Contact Us</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Theme" content="blitz 1011, default">
<meta name="Microsoft Border" content="none, default">
</head>

<body>

<p> </p>
<div align="center">
<table border="0" width="950">
<tr>
<td width="215" height="170" bgcolor="#FFFFFF" align="center" style="border-top: 7px ridge #0000FF">
<img border="0" src="smallpirate.jpg" width="127" height="115" style="background-color: #FFFF00"></td>
<td>
<p align="center"><b>
<font face="Signboard" size="6" color="#0066FF">Capt'n D's Tropical Adventures</font></b></p>
<p align="center"><b><i><font face="Comic Sans MS" color="#0066FF">"The only way to experience Costa
Rica."</font></i></b></p>
<p> </td>
<td width="215" bgcolor="#FFFFFF" align="center" height="170" style="border-top: 8px ridge #0000FF">
<img border="0" src="na00086a.gif" width="100" height="57"></td>
</tr>
<tr>
<td width="215" height="415" bgcolor="#FFFFFF" align="center">
<table border="0" width="80%" height="260">
<tr>
<td>
<p align="center">
<font face="Comic Sans MS" color="#FFFF00">
<a style="color: #0066FF" href="index.htm">Home</a></font></td>
</tr>
<tr>
<td>
<p align="center">
<font face="Comic Sans MS" color="#0066FF">
<a href="contacts.htm"><font color="#0066FF">Contact Us</font></a></font></td>
</tr>
<tr>
<td>
<p align="center">
<font face="Comic Sans MS" color="#0066FF">
<a href="fishing_packages.htm"><font color="#0066FF">
Fishing Packages</font></a></font></td>
</tr>
<tr>
<td>
<p align="center">
<font face="Comic Sans MS" color="#0066FF">
<a href="nature_packages.htm"><font color="#0066FF">
Nature Activities</font></a></font></td>
</tr>
<tr>
<td>
<p align="center">
<font face="Comic Sans MS" color="#0066FF">
<a href="photo_gallery.htm"><font color="#0066FF">Photo
Gallery</font></a></font></td>
</tr>
<tr>
<td>
<p align="center">
<font face="Comic Sans MS"><a href="about_capt'n_d.htm">
<font color="#0066FF">About Capt'n D</font></a></font></td>
</tr>
</table>
<p align="center"> </td>
<td valign="top" rowspan="2">
<p style="margin-left: 15px; margin-right: 10px">
 </p>
<p style="margin-left: 15px; margin-right: 10px">
<font face="Comic Sans MS" color="#336600">For travel
arrangements or more information, contact</font></p>
<p style="margin-left: 15px; margin-right: 10px">
<font color="#336600">
<font face="Comic Sans MS">David Segrave</font><br>
<font face="Comic Sans MS">Professional
Consultants LLC<br>138 Vacation Lane</font><br>
<font face="Comic Sans MS">Waveland, MS 
39576</font>
</font>
<font face="Comic Sans MS"><font color="#336600"><br>(228) 467-5616
Office/Fax <br>e-mail </font><a href="mailto:dsegrave@bellsouth.net">
<font color="#0066FF">dsegrave@bellsouth.net</font></a></font><font color="#0066FF">
</font>
<p style="margin-left: 15px; margin-right: 10px">
<font color="#336600">
<font face="Comic Sans MS">or send us your
inquiry below.</font></font><p style="margin-left: 15px; margin-right: 10px">
<b><font size="4" color="#336600" face="Comic Sans MS">We can also
handle all of your international travel arrangements to and from
Costa Rica.</font></b><html></html><p style="margin-left: 15px; margin-right: 10px">
 <div align="center">
<table border="1" width="88%" height="374" style="border-left: 4px solid #000080; border-right: 4px solid #0000FF; border-top: 4px solid #000080; border-bottom: 4px solid #0000FF">
<tr>
<td align="center">
<form method="POST" action="/cgi/formmail">
<p style="margin-left: 15px; margin-right: 10px">
<textarea rows="14" name="S1" cols="52"></textarea></p><blockquote>

<html>
<head>
<script type="text/javascript">
function validate_required (field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false;}
else {return true}
}
}
function validate_form(this form)
{
if (validate_required(email,"Email must be filled out!")==false)
{email.focus();return false;}
}
}
</script>
</head>

<body>
<p>email: <input type="text" name="email" size="40">

<input type="reset" value="Reset" name="B4"></p><input type="hidden" name="recipient" value="dsegrave@captndscostaricanvacations.com">
</form>
</body>
</blockquote>

</html>

<p style="margin-left: 15px; margin-right: 10px">
 </p>

<p align="center">
 </td>
</tr>
</table>
</div>
<p>            
<b><font face="Comic Sans MS" color="#336600" size="4">We accept
VISA, MC, DISC & AMEX.</font></b></td>
<td width="215" bgcolor="#FFFFFF">
<img border="0" src="Picture%20017.jpg" width="211" height="155" style="border-left: 4px solid #000080; border-right: 4px solid #0000FF; border-top: 4px solid #000080; border-bottom: 4px solid #0000FF"><p>
<img border="0" src="Costa%20Rica%201%20034.jpg" width="211" height="158" style="border-left: 4px solid #000080; border-right: 4px solid #0000FF; border-top: 4px solid #000080; border-bottom: 4px solid #0000FF"></td>
</tr>
<tr>
<td width="215" height="415" bgcolor="#FFFFFF" align="center" style="border-bottom: 8px ridge #0000FF">
<img border="0" src="bluesailfishleft.jpg" width="150" height="187"></td>
<td width="215" bgcolor="#FFFFFF" align="center" style="border-bottom: 8px ridge #0000FF">
<img border="0" src="bluesailfish.jpg" width="150" height="187"></td>
</tr>
</table>
<p> </div>

</body>

</html>

#6 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:45 PM

Posted 31 March 2008 - 03:59 PM

That was the original HTML from frontpage? There are two sets of head tags, and two sets of body tags, two opening html tags, and only one closing html tag. I can' tell where one page starts and the other ends. Do you think you could submit your code again, and use the code tags so that we can see what is going on? When you type your reply, there is a box right above the text field that says "Insert special item". One of the items will be a codebox. When you select it, another small box will open on the left. Paste all of your code in there, and then submit your post.

If the code you just submitted isn't working, that is why. Your browser does not know what to do with it. A basic, blank page looks like this:
<html>
   <head>
	   <title></title>
   </head>
   <body>
   </body>
</html>

Notice that there is only one set of each tag. :thumbsup:

I follow the script in the example, do I still need to reference the external source?

No, because the javascript is contained right in with the HTML. As the example shows, it is contained right up there between the head tags. I should have noted that was only an example, and that you could not just cut and paste and expect it to work.

Your best bet would be to look around on the net a bit and find some ready made examples that you can plug right in, because (and this is just a hunch) you have never used javascript before. I am limited on time at the moment, but maybe one of our other members with more time can guide you.

#7 Leslie138

Leslie138
  • Topic Starter

  • Members
  • 33 posts
  • OFFLINE
  •  
  • Local time:04:45 PM

Posted 31 March 2008 - 05:52 PM

After all that trouble, and it was really something very simple (in the original, first page of code I sent). Thanks anyway.

#8 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:45 PM

Posted 31 March 2008 - 06:56 PM

:thumbsup:

At any rate, glad it works, even if I was no help at all.
:flowers:

#9 Leslie138

Leslie138
  • Topic Starter

  • Members
  • 33 posts
  • OFFLINE
  •  
  • Local time:04:45 PM

Posted 01 April 2008 - 07:00 AM

No, you were quite helpful, as I learned something about Javascript. The mistake I made was that the designated required field was all by itself without a form. The comment section was in the form but not the email field. I wish FrontPage had sent an error or something . . . . It's working fine now. Thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users