Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,261 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,185 people online right now. Registration is fast and FREE... Join Now!




problem with web page

 
Reply to this topicStart new topic

problem with web page, after clicking submit button all I get is... The page cannot be displa

grassdladmin
12 Oct, 2008 - 09:15 AM
Post #1

New D.I.C Head
*

Joined: 11 Oct, 2008
Posts: 7

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

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();"
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.gif
~BetaWar
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Problem With Web Page
12 Oct, 2008 - 10:03 AM
Post #2

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,020



Thanked: 81 times
Dream Kudos: 1175
My Contributions
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:
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.
User is offlineProfile CardPM
+Quote Post

grassdladmin
RE: Problem With Web Page
12 Oct, 2008 - 10:19 AM
Post #3

New D.I.C Head
*

Joined: 11 Oct, 2008
Posts: 7

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?
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Problem With Web Page
12 Oct, 2008 - 10:25 AM
Post #4

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,020



Thanked: 81 times
Dream Kudos: 1175
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

grassdladmin
RE: Problem With Web Page
12 Oct, 2008 - 10:44 AM
Post #5

New D.I.C Head
*

Joined: 11 Oct, 2008
Posts: 7

thanks I got it!
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Problem With Web Page
12 Oct, 2008 - 11:12 AM
Post #6

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,020



Thanked: 81 times
Dream Kudos: 1175
My Contributions
No problem, just glad to have helped out smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 04:38AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month