Results 1 to 8 of 8

Thread: Help with user Forms

  1. #1
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Help with user Forms

    Hi,
    I have created a form and, up to yet, so far so good. But when i tested it, i clicked submit and it did not send. Any help would be greatly appreciated. The code is below, as is the website. Thanks.
    </form>
    <FORM action="http://www.freewebs.com/binfreshcleaningservices/main.htm" method=post>
    <input type=hidden name="userid" value="10679505">
    <input type=hidden name="next" value=" http://www.freewebs.com/binfreshcleaningservices/main.htm">
    Your Name:
    <input type="text" name="Name" align="top"
    maxlength="25" size="30" value="Your Full Name">
    <br>
    Your Email Address:
    <input type="text" value="Your Email Address" name="Email" align="top"
    maxlength="25" size="30">
    <br><br>
    <form>

    <select name="pulldown">

    <option value="1">Enquiries / Booking</option>

    <option value="2">Comments</option>

    <option value="2">F.A.Q'S</option>

    </select><br>
    </form>

    Comments:<br>
    <textarea cols=25 rows=6 name="Comments">Please leave your comments here.</textarea>
    <br>
    <br>
    <input type="submit" name="Submit" value="Click to Submit!">
    </FORM> </p><br><br>
    Hope you can help
    P.S here is the website: www.freewebs.com/binfreshcleaningservices soon to be www.binfreshcleaningservices.com
    Last edited by liljoey; 03-05-2005 at 01:39 PM.

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by liljoey
    </form>
    <FORM [...]
    Validate your mark-up. Seriously.

    A few tips:

    • Use a title that is specific to every page. The title should be able to tell a user precisely what is on that page even taken completely out of context.
    • Use semantic mark-up, not outdated HTML 3.2 junk.
    • Validate you mark-up, especially if something isn't working properly.
    • Don't spread your content out too much. Don't make visitors scroll unnecessarily. They should never have to scroll horizontally.
    • Don't use marquees. Scrolling text is distracting and annoying, especially if there's a lot of text: if the user misses it, they have to wait for a complete cycle.
    • Don't produce links that link back to the same page.
    Here's one way to rewrite your page correctly:

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
     "http://www.w3.org/TR/html4/strict.dtd">
    
    <html lang="en" dir="ltr">
    <head>
    	<title>Bin Fresh Cleaning Services - Contact Us</title>
    
    	<style type="text/css">
    		body {
    			font: 100% sans-serif;
    			margin: 1ex;
    			padding: 0;
    		}
    
    		h1, h2 {
    			margin: 0;
    			padding: 0;
    		}
    		h1 {
    			font: 130% sans-serif;
    			margin-bottom: 0.4em;
    			text-align: center;
    		}
    		h2 {
    			font: 110% sans-serif;
    			margin-bottom: 0.8em;
    		}
    
    		#contact,
    		#navigation,
    		#navigation li {
    			list-style-type: none;
    			margin: 0;
    			padding: 0;
    		}
    
    		#contact {
    			margin-left: 1em;
    		}
    		#contact fieldset,
    		#contact form,
    		#contact legend {
    			margin: 0;
    			padding: 0;
    		}
    		#contact fieldset {
    			border-style: none;
    		}
    		#contact legend {
    			display: none;
    		}
    		#contact li {
    			padding-bottom: 0.5ex;
    		}
    		#contact table {
    			margin: 0 0 0 1ex;
    		}
    
    		#content {
    			background: white url(http://www.freewebs.com/binfreshcleaningservices/phone.gif) no-repeat 85% 0%;
    			margin-left: 11.75em;
    		}
    
    		#navigation {
    			border: 1px inset black;
    			padding: 1ex;
    			float: left;
    			width: 10em;
    		}
    	</style>
    </head>
    
    <body>
    	<h1>Contact us</h1>
    	<ul id="navigation">
    	<li><a href="http://www.freewebs.com/binfreshcleaningservices/">Home</a></li>
    	<li><a href="http://www.freewebs.com/binfreshcleaningservices/sp.htm">Services and prices</a></li>
    	<li class="current">Contact us</li>
    	<li><a href="http://www.freewebs.com/binfreshcleaningservices/about.htm">About us</a></li>
    	<li><a href="http://www.freewebs.com/binfreshcleaningservices/faq.htm"><abbr title="Frequently asked questions">FAQ</abbr></a></li>
    	</ul>
    	<div id="content">
    	<h2>Contact methods</h2>
    	<ul id="contact">
    	<li>E-mail: xxx@yyy.zzz</li>
    	<li>Phone: aaaan nnn nnn</li>
    	<li>Form:
    		<form action="url" method="post">
    		<fieldset><legend></legend>
    		<input type="hidden" name="userid" value="10679505">
    		<input type="hidden" name="next" value=" http://www.freewebs.com/binfreshcleaningservices/main.htm">
    		<table>
    		<tr>
    			<td><label for="name">Name:</label></td>
    			<td><input type="text" id="name" name="Name"></td>
    		</tr>
    		<tr>
    			<td><label for="e-mail">E-mail address:</label></td>
    			<td><input type="text" id="e-mail" name="E-mail"></td>
    		</tr>
    		<tr>
    			<td><label for="subject">Subject:</label></td>
    			<td><select id="subject" name="Subject" size="1">
    				<option value="Enquires" selected>Enquires/Bookings</option>
    				<option value="Comments">Comments</option>
    				<option value="FAQ">FAQ</option>
    			</select></td>
    		</tr>
    		<tr>
    			<td><label for="comments">Comments:</label></td>
    			<td><textarea id="comments" name="Comments:" cols="40" rows="6"></textarea></td>
    		</tr>
    		<tr>
    			<td></td>
    			<td><input type="submit" value="Send"></td>
    		</tr>
    		</table>
    		</fieldset>
    		</form></li>
    	</ul>
    	</div>
    </body>
    </html>
    As for why it didn't send, you didn't specify the action attribute you probably meant to.

    Mike

  3. #3
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Thanks

    Thanks Mike,
    you gave me some great tips on having a user friendly website. There is however, one problem! I am 13, and although i have alot of knowedge of html, i don't know what you mean by i need to validate my mark-up And what the heck is semantic mark-up?

    Also, when i click send, it comes up page not found, if you could tell me the confirmation page, that would be brill!

    Once again I am greatful for your help (as is my uncle, it is his site but he does not know how to make them!! ) and would appreciate any help given.

    Joe
    Last edited by liljoey; 03-06-2005 at 08:59 AM.

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I thought I'd mention now that the code I posted previously was meant to demonstrate a complete replacement for the page, not just the form. If you're only interested in the form, take only that element (and it's content, of course). To keep it looking the same, you'll need to also copy parts of the style sheet, but trimmed and slightly altered to:

    HTML Code:
    <style type="text/css">
      fieldset,
      form,
      legend {
        margin: 0;
        padding: 0;
      }
      fieldset {
        border-style: none;
      }
      legend {
        display: none;
      }
      table {
        margin: 0 0 0 1ex;
      }
    </style>
    You'd place that in the head element.

    Quote Originally Posted by liljoey
    Thanks Mike,
    You're welcome.

    There is however, one problem! I am 13, [...]
    Nothing like learning while you're young. Just make sure you learn the right things. The vast majority of written material (on- and off-line) is horribly outdated. The best place to learn, after reading the HTML specification, are newsgroups like alt.html (pretty much anything related to writing HTML, including associated languages), comp.infosystems.www.authoring.html (only (X)HTML for use on the Web) and comp.infosystems.www.authoring.stylesheets (only style sheet languages [like CSS] for use on the Web).

    The HTML spec. is easy to read, though I can't say I've approached it from a thirteen year old's point of view.

    Newsgroups (in general) are very much an adult environment and can seem hostile at times. However, as long as you don't pick fights and just accept that what you're told is correct and helpful (even if it doesn't seem like it), you'll be fine. If you do come across obtuse replies, just politely ask the person (preferably by e-mail, if they provide a valid address) what they meant. Newsgroup regulars are extremely knowledgeable and are very helpful - just don't do anything to get on their bad side! I could probably write a book on how to approach newsgroups...

    i don't know what you mean by i need to validate my mark-up And what the heck is semantic mark-up?
    There are two approaches to authoring HTML documents: semantic and presentational.

    Mark-up languages describe content. They take plain text and add structure and meaning. Each element in HTML provides a different meaning: headings, paragraphs, lists, data relationships (through tables), sections (through div elements). Using elements properly in this manner is what is meant by the phrase, "semantic mark-up". The alternative - presentational - uses HTML elements to only achieve a visual result. Examples of presentational mark-up include tables-for-layout, the font element, the center element, and any attributes (such as align and bgcolor) which do nothing other than change appearance.

    Until relatively recently, it wouldn't be possible to use semantic mark-up as user agents (browsers, amongst other software) didn't provide any other way to layout the content of a HTML document. However, with wide (if somewhat incomplete) support of cascading style sheets (CSS) this is no longer the case. CSS provides total and flexible control over content.

    The advantages of semantic mark-up is that it typically results in smaller and simpler files (so less to store and transmit). This simplicity makes styling more flexible, and changes easier. With the increasing use of mobile devices and disabled users (who tend to use specialist software), these advantages are important.

    It's important to note that you shouldn't use IE when developing a site. IE, by any objective standard, is a terrible browser and is full of rendering bugs. Browsers like Firefox (or Mozilla) and Opera (both are free) give a much more accurate picture of how your site really looks. Once you've finished, then look using IE and attempt to correct any problems.

    As for validation, like any language (computer or natural), HTML has grammar. Some elements are only allowed when used with other elements, whilst some elements are forbidden. A validator checks for these sorts of problems and other syntax errors like overlapping elements:

    HTML Code:
    <form ...><div>...</form></div>
    There are several validator services, the most renowned being the W3C validator. Be warned: the output from validators can be a little confusing at first as you'll be unfamiliar with the problems it's trying to warn you about.

    Also, when i click send, it comes up page not found, if you could tell me the confirmation page, that would be brill!
    I didn't include a URL (just the text "url") as I didn't know what the correct one was.

    If your host does provide a form processor, you'll have to look through the service help information for the address. As I don't have an account, I might not be able to find it all. Alternatively, ask technical support for the information.

    If your host doesn't provide a form processor, you can find free services on the Web.

    Hope that helps. Just ask if something didn't make sense - I have a tendancy to be terse.

    Mike

  5. #5
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry

    Thanks once again Mike,
    you have provided great help! Once again (as always) I have another problem!!!!! When I click send it comes up:

    Method Not Allowed

    The requested method POST is not allowed for the URL /binfreshcleaningservices/main.htm.


    --------------------------------------------------------------------------------

    Apache/1.3.31 Server at www.freewebs.com Port 80

    submit a contact form to see what I mean! Could you help me please? sorry for the hassle. From Joe

  6. #6
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by liljoey
    When I click send it comes up:

    [...]

    The requested method POST is not allowed for the URL /binfreshcleaningservices/main.htm.
    The URL that needs to be used will point to a server-side script which will read the information submitted by the user and e-mail it to your uncle. Such a URL might be something like http://www.freewebs.com/cgi-bin/formmail.pl but I really advise you to contact the technical support people at FreeWebs for the correct address.

    I get the impression that you have to pay for form processing scripts, so you might want to look at the list of services I pointed to in the last link of my previous post.

    Good luck,
    Mike

  7. #7
    Join Date
    Feb 2005
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have actually used freewebs before and you get so many forms per month but you have to create it using their form maker. It is really stupid but then after you make it go to the page copy the code that they give you and then put it on any of your pages you wish.

  8. #8
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks the big t,
    I knew they (freewebs) provided you with a script, but I just clicked the link they had provided to webmonkey! I will try there form script today and tell you if it works or not, sorry about the long wait of a response, my computer has been broke!!! Thanks for your help mwinter and TheBigT

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •