problem with web page

after clicking submit button all I get is... The page cannot be displa

Page 1 of 1

5 Replies - 1537 Views - Last Post: 12 October 2008 - 12:12 PM

#1 grassdladmin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 11-October 08

problem with web page

Posted 12 October 2008 - 10:15 AM

not sure i am doing this correctly - after submit button is clicked page goes to .......The page cannot be displayed - any info would be welcomed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<!--

	10/10/08
	Web 420 SR-kf-011
-->
<!--
	Web Page Title
-->
<title>Kudler Fine Foods Demographic</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-1159-1">

<script type="text/javascript">

<!-- Form check -->

function submitForm() {
if (document.forms[0].fname.value == ""
	|| document.forms[0].lname.value == ""
	|| document.forms[0].address1.value == ""
	|| document.forms[0].city.value == ""
	|| document.forms[0].city.value == ""
	|| document.forms[0].state.value == ""
	|| document.forms[0].zip.value == ""
	|| document.forms[0].phone.value == ""
	window.alert(" enter your information.");
	return false;
}

return true;
}
</script>
</head>

<body style="color: blue; margin:0"; background="ob018.jpg">
<form name="request" id="request" action="Verification.htm"
onsubmit="return submitForm();"
onreset="return confirmReset()"
onsubmit="return validate_form();" method="get"
enctype="application/x-www-form-urlelncoded">

<table border="0" cellspacing="0" cellpadding="5" width="620" >

<thead style="font-family: sans-serif">

<!--
	Company Logo and Heading
-->

<tr>
   <td valign="top" width="180" rowspan="2">
	  <img src="Kudler-food-blk.gif" alt="kudler" width="275" height="175" >
   </td>
   <td style="font-size: 1.2em; color: blue; font-weight: bold; font-style: italic"
	   valign="top" align="center" >
		 Kudler Fine Foods Customer Information Form
   </td>
</tr>
</thead>

<!-- Customer Information -->
<tr>
   <td style="font-family: sans-serif; font-size: large; font-weight: bold"
	   colspan="2" width="100%">
		 Customer Information
   </td>
</tr>
<tr>
   <td colspan="2">
	  <hr style="color: blue; background-color: blue; height: 1" >
   </td>
</tr>


<!-- Contact Information   -->
<tr>
   <td valign="top" colspan="2">
   <table>
	<tr>
		<td width="100"><label for="fname">First Name</label></td>
		<td><input type="text" name="fname" id="fname" size="30" >
		<td><label for ="lname">Last Name</label></td>
		<td><input type="text" name="lname" id="lname" size="30" >
		</td>
	</tr>
	<tr>
		<td><label for ="address1">Address #1</label></td>
		<td><input type="text" name="address1" id="address1" size="60" ></td>
	</tr>
	<tr>
		<td><label for ="address2">Address #2</label></td>
		<td><input type="text" name="address2" id="address2" size="60" ></td>
	</tr>
	<tr>
		<td><label for="city">City</label></td>
		<td><input type="text" name="city" id="city" size="40" >
		<label for="state">State</label>
		<input type="text" name="state" id="state" size="3" >
		<td><label for="zip">ZIP</label></td>
		<td><input type="text" name="zip" id="zip" size="10" maxlength="10" >
		</td>
	</tr>
	<tr>
	<td><label for="phone">Phone</label></td>
		<td><input type="text" name="phone" id="phone" size="12" >
	</td>
	</tr>
	<tr>
		<td><label for="email">Email Address</label></td>
		<td><input type="text" name="email" id="email" size="40" ></td>
	</tr>

	</table>
   </td>
	<tr>
		<td valign="top">
		<input type="checkbox" name="use" id="mail" value="mail" >
		<label for="mail">Add me to your Mailing List</label><br >
		</td>
	</tr>
<tr>
   <td colspan="2">
	  <hr style="color: green; background-color: green; height: 1" >
   </td>
</tr>
<!--
	Customer Comments
-->
<tr>
<td width="100" valign="top">
<label for="comments">Comments</label>
</td>
<td valign="top">
<textarea name="comments" id="comments" rows="6" cols="40">
</textarea>
</td>
</tr>

<!-- Buttons for cancelation or submission -->
<tr>
   <td valign="top" colspan="2" align="center">
   <input type="submit" value="Submit" >
   <input type="reset" value="Cancel" >
   </td>

</tr>

<!-- Company Name and locations -->
<tr style="background-color: blue">
   <td colspan="2" align="center" valign="bottom">
	  <address style="font-family: sans-serif; font-size: 0.8em; font-style: normal; color: white">
	  Kudler Fine Foods  Del Mar   La Jolla   Encinitas 
	  </address>
   </td>
</tr>
</table>


</form>
</body>

</html>


Mod edit - Please :code:
~BetaWar

Is This A Good Question/Topic? 0
  • +

Replies To: problem with web page

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1490
  • View blog
  • Posts: 8,217
  • Joined: 07-September 06

Re: problem with web page

Posted 12 October 2008 - 11:03 AM

You have a problem with your IF statement, as well as your form, you give it 2 onsubmit commands and one of them gets overwritten, which will cause problems.

Here is some working code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<!--

	10/10/08
	Web 420 SR-kf-011
-->
<!--
	Web Page Title
-->
<title>Kudler Fine Foods Demographic</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-1159-1">

<script type="text/javascript">

<!-- Form check -->

function submitForm() {
if (document.forms[0].fname.value == "" || document.forms[0].lname.value == "" || document.forms[0].address1.value == "" || document.forms[0].city.value == "" || document.forms[0].city.value == "" || document.forms[0].state.value == "" || document.forms[0].zip.value == "" || document.forms[0].phone.value == ""){
	  window.alert(" enter your information.");
	  return false;
  }
  return true;
}
</script>
</head>

<body style="color: blue; margin:0"; background="ob018.jpg">
<form name="request" id="request" action="Verification.htm"
onsubmit="return submitForm();" method="get" enctype="application/x-www-form-urlelncoded">

<table border="0" cellspacing="0" cellpadding="5" width="620" >

<thead style="font-family: sans-serif">

<!--
	Company Logo and Heading
-->

<tr>
   <td valign="top" width="180" rowspan="2">
	  <img src="Kudler-food-blk.gif" alt="kudler" width="275" height="175" >
   </td>
   <td style="font-size: 1.2em; color: blue; font-weight: bold; font-style: italic"
	   valign="top" align="center" >
		 Kudler Fine Foods Customer Information Form
   </td>
</tr>
</thead>

<!-- Customer Information -->
<tr>
   <td style="font-family: sans-serif; font-size: large; font-weight: bold"
	   colspan="2" width="100%">
		 Customer Information
   </td>
</tr>
<tr>
   <td colspan="2">
	  <hr style="color: blue; background-color: blue; height: 1" >
   </td>
</tr>


<!-- Contact Information   -->
<tr>
   <td valign="top" colspan="2">
   <table>
	<tr>
		<td width="100"><label for="fname">First Name</label></td>
		<td><input type="text" name="fname" id="fname" size="30" >
		<td><label for ="lname">Last Name</label></td>
		<td><input type="text" name="lname" id="lname" size="30" >
		</td>
	</tr>
	<tr>
		<td><label for ="address1">Address #1</label></td>
		<td><input type="text" name="address1" id="address1" size="60" ></td>
	</tr>
	<tr>
		<td><label for ="address2">Address #2</label></td>
		<td><input type="text" name="address2" id="address2" size="60" ></td>
	</tr>
	<tr>
		<td><label for="city">City</label></td>
		<td><input type="text" name="city" id="city" size="40" >
		<label for="state">State</label>
		<input type="text" name="state" id="state" size="3" >
		<td><label for="zip">ZIP</label></td>
		<td><input type="text" name="zip" id="zip" size="10" maxlength="10" >
		</td>
	</tr>
	<tr>
	<td><label for="phone">Phone</label></td>
		<td><input type="text" name="phone" id="phone" size="12" >
	</td>
	</tr>
	<tr>
		<td><label for="email">Email Address</label></td>
		<td><input type="text" name="email" id="email" size="40" ></td>
	</tr>

	</table>
   </td>
	<tr>
		<td valign="top">
		<input type="checkbox" name="use" id="mail" value="mail" >
		<label for="mail">Add me to your Mailing List</label><br >
		</td>
	</tr>
<tr>
   <td colspan="2">
	  <hr style="color: green; background-color: green; height: 1" >
   </td>
</tr>
<!--
	Customer Comments
-->
<tr>
<td width="100" valign="top">
<label for="comments">Comments</label>
</td>
<td valign="top">
<textarea name="comments" id="comments" rows="6" cols="40">
</textarea>
</td>
</tr>

<!-- Buttons for cancelation or submission -->
<tr>
   <td valign="top" colspan="2" align="center">
   <input type="submit" value="Submit" >
   <input type="reset" value="Cancel" >
   </td>

</tr>

<!-- Company Name and locations -->
<tr style="background-color: blue">
   <td colspan="2" align="center" valign="bottom">
	  <address style="font-family: sans-serif; font-size: 0.8em; font-style: normal; color: white">
	  Kudler Fine Foods  Del Mar   La Jolla   Encinitas 
	  </address>
   </td>
</tr>
</table>


</form>
</body>

</html>


Hope that helps.
Was This Post Helpful? 0
  • +
  • -

#3 grassdladmin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 11-October 08

Re: problem with web page

Posted 12 October 2008 - 11:19 AM

Thanks - but the page still goes to The page cannot be displayed after hitig the submit button - do I need to link it to another page?
Was This Post Helpful? 0
  • +
  • -

#4 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1490
  • View blog
  • Posts: 8,217
  • Joined: 07-September 06

Re: problem with web page

Posted 12 October 2008 - 11:25 AM

I would suggest making sure that you have the page Verification.htm on your server in the same place (folder) that you are running your form in. You also need to make sure that the file name is exactly the same as the one you are looking for (this matters in some web browsers).

If I could get a link to your website I could help more.
Was This Post Helpful? 0
  • +
  • -

#5 grassdladmin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 11-October 08

Re: problem with web page

Posted 12 October 2008 - 11:44 AM

thanks I got it!
Was This Post Helpful? 0
  • +
  • -

#6 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1490
  • View blog
  • Posts: 8,217
  • Joined: 07-September 06

Re: problem with web page

Posted 12 October 2008 - 12:12 PM

No problem, just glad to have helped out :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1