Jump to content
  • Announcements

    • boen_robot

      Guidelines and Netiquette   03/28/2017

      Posting Problems:   Having problems posting your topic? Read through this: To join, you agree to our terms and conditions and fill out and submit a registration form. An activation email will be sent to your email adress, so you'll need to verify your account. After that the account has to be validated by one of the moderators. This will mean that it can take up to a day to be activated. A couple of things to remember to ensure approval: Don't use an email address in one of those $2 four character .com domains eg. xyds.com. These will be deleted and the domain added to the banned list. Don't use an email address that is within a domain with a bad reputation for spam. A Google search is run on every email address and email domain. Don't sign up with an email address that doesn't exist, doesn't work or requires the sender to answer a quiz before their email can get to you. Put your country and or state and city in the signup form. Blank forms will go to the botton of the "to do" list. And make sure that your email address and your country match, saying you're from Alabama and using a .ru email address is not going to get you activated. After a membership is activated the first few posts will be monitored. Posting spam or unapproved topics described in the agreement results in an immediate ban. The email provider and the IP addresses associated with the account will be banned and all posts will be deleted. These strict measures have been deemed necessary to hinder spam. Sorry for any inconvenience this causes, but it's not liable to change. If, after reading this, you still can't post and don't understand why, contact one of the Moderators listed here.   Topic Guidelines   Including the following information can expedite an accurate response from board members: Must be a Specific Problem or Question related to web design and development Include Code in Question (wrap with   for small blocks of code and for longer blocks   ) Include Code Author Include Extra Notes/Modifications/Attempts Include web link to page/file when possible Content Guidelines   You may not post, upload, link to, or email any Content that contains, promotes, gives instruction about, or provides prohibited Content. Prohibited Content includes any Content that breaks any local, state, county, national or international law. Prohibited Content also includes: No direct or indirect advertising or websites, forums, products, services No hijacking of posts (do not post your question in someone elses) Content that infringes upon any rights [ex. MP3s and ROMs] (including, but not limited to, copyrights and trademarks) Abusive, threatening, defamatory, racist, or obscene Viruses or any other harmful computer software False Information or libel Spam, chain letters, or Pyramid schemes Gambling or Illicit drugs Terrorism Hacking or cheating for internet/online games Warez, Roms, CD-Keys, Cracks, Passwords, or Serial Numbers Pornography, nudity, or sexual material of any kind Excessive profanity Invasive of privacy or impersonation of any person/entity Hacking materials or information Posting Tips   There are more BBcodes than there are buttons for on the reply menu. To get the full list, click "BB Code Help" underneath the clickable smilie face menu. Use   for small snippets of code Use   for lengthy snippets of code Use   if your snippet is HTML (optional) Use   if your snippet is SQL (optional) Rules of Conduct   Be nice. There's no need for calling someone stupid if they ask an 'easy' question. Keep your avatars and signatures absolutely child friendly. We have a younger audience on this forum. Keep your language appropriate for the same reason above. Do not PM moderators for help on the forum. Post on the topic, or create a new one.   Spam:   Recently, as you have all without doubt noticed, we have had lots of spam and advertisement on the forum. Therefore, we'd like to alert you as to what to do when you have found any of the aforementioned annoying messages: it. Immediately. Give a clear reason, please, if the advertising is not evident. DO NOT POST! Report, let the post stay as is, and we will get to it, meanwhile if you continue to post as normal in the other threads, it won't be on the top so long. Refrain from PMing the member. This won't help at all, as they are most likely spambots anyway. Thank you.       Images in signatures:   After thinking of users on dial-up, we have decided to enforce the following rules regarding signatures. Please pay heed to them. Respecting these rules is respecting the members on this forum with dial-up. Signature rules: No animated images AT ALL. No matter the amount of animation. Maximum image widthxheight: 300x150 Maximum image (file) size: 15kb Use calm colors. Do not use highly contrasting images in your signature, as this can get really annoying when seeing several posts from one member in the same thread. The same prohibited content goes for images as for posts. Lastly, use common sense. No lengthy signatures please. Save us some scrolling. Thank you.       Links in signatures:   Please understand that w3schools.com only exists because of voluntary work and is barely supported by the advertising littered throughout the tutorials and the forum. So, please, stop advertising other sites. DO not post links that drive traffic away from the w3schools domain - especially to a site that offers similar if not identical information. Please help support the site by keeping individuals on it. Thank you. Here are some guidelines as to what you can put in your signature: w3schools links --> allowed w3.org links --> allowed browser links --> allowed html editor links --> allowed personal sites --> allowed tutorial sites competing with w3schools --> NOT allowed sites completely irrelevant to webprogramming and this forum --> NOT allowed   Thanks for understanding, and for taking the time to read this. ~W3Schools Modstaff~
cncr

Tables, lists and Forms

Recommended Posts

cncr    0

I dunno, but am I the only one :) having trouble knowing exactly what to do when it comes to tables <_< , lists :) and forms :) It is so frustrating :) , because it is the most boring and hard thing to understand.Who has some advice ? :( Thnx

Share this post


Link to post
Share on other sites
thescientist    231

what is it exactly you are having a problem with?

Edited by thescientist

Share this post


Link to post
Share on other sites
cncr    0
what is it exactly you are having a problem with?
Hi, thnx for replyingI have been busy with Html, xhtml and css all at once :) ; so you can understand why I say thatMaybe if I take it slow and give each toppic enough time to master :) , I will then be able to get it.............................but to all these are the most boring and frustrating toppic ( to me ), but the output is the best.......... :) It is these toppics that make websites stand out and convinient or so, ( e.g.FORMS )But if you have some advice you're welcome : :(

Share this post


Link to post
Share on other sites
thescientist    231

um... just keep trying and practicing? All three of them are basic elements with pretty straightforward implementations. I guess without any specifics, I'm not really what to say, other than the most basic of basic advice:1) only use tables for tabular data, not laying out your webpages2) lists are often used for navigation3) forms are typically used with server side scripts to send data to a database or to send emails (i.e. contact forms). Like I said, if there is some sort of specific problem you are having then let us know, other than that, I'm not really sure what you're difficulties are or what advice you're looking for.

Share this post


Link to post
Share on other sites
cncr    0
um... just keep trying and practicing? All three of them are basic elements with pretty straightforward implementations. I guess without any specifics, I'm not really what to say, other than the most basic of basic advice:1) only use tables for tabular data, not laying out your webpages2) lists are often used for navigation3) forms are typically used with server side scripts to send data to a database or to send emails (i.e. contact forms). Like I said, if there is some sort of specific problem you are having then let us know, other than that, I'm not really sure what you're difficulties are or what advice you're looking for.
Why is it then that people use tables for designing; because I have downloaded a few templates ( to practice) and here is the source code from one particular that does use tables in it's design :)
<html><head><meta http-equiv="Content-Language" content="hr"><meta http-equiv="Content-Type" content="text/html; charset=windows-1250"><meta name="GENERATOR" content="Microsoft FrontPage 5.0"><meta name="ProgId" content="FrontPage.Editor.Document"><LINK href="style.css" type=text/css rel=stylesheet></head><body><div align="center">  <center>  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="769" id="AutoNumber1">    <tr>      <td width="100%">      <img border="0" src="images/logo.jpg" width="769" height="153"></td>    </tr>    <tr>      <td width="100%">      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">        <tr>          <td width="20%">          <a onMouseOver="if (document.images) document.home.src= 'images/m1_hover.jpg';" onMouseOut="if (document.images) document.home.src= 'images/m1.jpg';" href="index.htm"><img src= "images/m1.jpg" alt="Ricky´s web templates" name="home" border=0 width="163" height="44"></a></td>          <td width="20%">          <a onMouseOver="if (document.images) document.about.src= 'images/m2_hover.jpg';" onMouseOut="if (document.images) document.about.src= 'images/m2.jpg';" href="index.htm"><img src= "images/m2.jpg" alt="Ricky´s web templates" name="about" border=0 width="147" height="44"></a></td>          <td width="20%">          <a onMouseOver="if (document.images) document.services.src= 'images/m3_hover.jpg';" onMouseOut="if (document.images) document.services.src= 'images/m3.jpg';" href="index.htm"><img src= "images/m3.jpg" alt="Ricky´s web templates" name="services" border=0 width="150" height="44"></a></td>          <td width="20%">          <a onMouseOver="if (document.images) document.support.src= 'images/m4_hover.jpg';" onMouseOut="if (document.images) document.support.src= 'images/m4.jpg';" href="index.htm"><img src= "images/m4.jpg" alt="Ricky´s web templates" name="support" border=0 width="146" height="44"></a></td>          <td width="20%">          <a onMouseOver="if (document.images) document.contact.src= 'images/m5_hover.jpg';" onMouseOut="if (document.images) document.contact.src= 'images/m5.jpg';" href="index.htm"><img src= "images/m5.jpg" alt="Ricky´s web templates" name="contact" border=0 width="163" height="44"></a></td>        </tr>      </table>      </td>    </tr>    <tr>      <td width="100%">      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3">        <tr>          <td width="1%" background="images/shadow_left.jpg">          <img border="0" src="images/shadow_left.jpg" width="15" height="53"></td>          <td width="98%" valign="top">           <table border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" width="100%" id="AutoNumber4" height="454">            <tr>              <td width="1%" style="border-right: 2px solid #000000" valign="top" height="454">              <table border="0" cellpadding="0" cellspacing="7" bordercolor="#111111" width="190" id="AutoNumber5">                <tr>                  <td width="100%">                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber6">                    <tr>                      <td width="1%">                      <img border="0" src="images/kut_plavi_left.jpg" width="13" height="31"></td>                      <td width="98%" background="images/bg_menu.jpg">                      <p align="center" class="text2">Latest News</td>                      <td width="1%">                      <img border="0" src="images/kut_plavi_right.jpg" width="13" height="31"></td>                    </tr>                  </table>                  </td>                </tr>                <tr>                  <td width="100%">                  <p align="left" style="margin: 10 20">Thank you for                   downloading this template. This template is free for personal                   use, but you must leave our link on this page. Before using                   read our <a href="http://www.rickyswebtemplates.com/terms.htm">                  terms and conditions</a>.                   <p align="left" style="margin: 10 20"></td>                </tr>                <tr>                  <td width="100%"><table border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" width="100%" id="AutoNumber6">                    <tr>                      <td width="1%">                      <img border="0" src="images/kut_plavi_left.jpg" width="13" height="31"></td>                      <td width="98%" background="images/bg_menu.jpg">                      <p align="center" class="text2">Our Products</td>                      <td width="1%">                      <img border="0" src="images/kut_plavi_right.jpg" width="13" height="31"></td>                    </tr>                  </table></td>                </tr>                <tr>                  <td width="100%">                  <p align="left" style="margin: 20">Thank you for downloading                   this template. This template is free for personal use, but you                   must leave our link on this page. Before using read our                  <a href="http://www.rickyswebtemplates.com/terms.htm">terms                   and conditions</a></td>                </tr>                <tr>                  <td width="100%"> </td>                </tr>                </table>              </td>              <td width="99%" valign="top" height="454">              <p align="left" style="margin: 10 20">Thank you for downloading               this template. This template is free for personal use, but you               must leave our link on this page. Before using read our              <a href="http://www.rickyswebtemplates.com/terms.htm">terms and               conditions</a>. Help about editing our templates and empty buttons               and logos for editing you will find here:<p align="left" style="margin: 10 20">              <a href="http://www.rickyswebtemplates.com/members/login.php">              [url="http://www.rickyswebtemplates.com/members/login.php</a>.<p"]http://www.rickyswebtemplates.com/members/...lt;/a>.<p[/url] align="left" style="margin: 10 20"> We               have created user guide with step by step instructions. If you               don't know how to edit our free templates, or you don't have time               we can do that for you. For only $30 USD we will edit logo,               buttons and create few pages the way you like it. You only have to               put your text in it and your web page is done. For more               information, <a href="mailto:webmaster@rickyswebtemplates.com">              contact us</a> :<a href="mailto:webmaster@rickyswebtemplates.com">webmaster@rickyswebtemplates.com</a>                <p align="left" style="margin: 10 20">For more FREE web templates               and other graphics visit our site:              <a href="http://www.rickyswebtemplates.com/webtemplates.htm">              [url="http://www.rickyswebtemplates.com/webtemplates.htm</a><p"]http://www.rickyswebtemplates.com/webtempl...</a><p[/url] align="left" style="margin: 10 20">              <a href="http://www.rickyswebtemplates.com/webtemplates.htm"> </a>If               you need premium templates at low price then go here:<p align="left" style="margin: 10 20">              <a href="http://www.rickyswebtemplates.com/webtemplates.htm">http://www.rickyswebtemplates.com/webtemplates.htm</a><p align="left" style="margin: 10 20">              <a href="http://www.rickyswebtemplates.com/webtemplates.htm"> </a><a href="http://www.rickyswebtemplates.com/members.htm">http://www.rickyswebtemplates.com/members.htm </a>              <p align="left" style="margin: 10 20">Fonts used for logo are               "Titanick-Display" , and for buttons “Arial”.</td>            </tr>          </table>          <p> </p>          </td>          <td width="1%" background="images/shadow_right.jpg">          <img border="0" src="images/shadow_right.jpg" width="15" height="53"></td>        </tr>      </table>      </td>    </tr>    <tr>      <td width="100%" background="images/bottom.jpg" height="41" align="center">      <p align="center" class="text1" style="margin-top: 0; margin-bottom: 10"><a class="down" href="index.htm">Home</a>   l        <a class="down" href="index.htm">About Us </a>  l         <a class="down" href="index.htm">Services</a>   l         <a class="down" href="index.htm">Support </a>  l         <a class="down" href="index.htm">Contact Us</a>       </td>    </tr>    <tr>      <td width="100%">      <p align="center">© 2007 Your company name. All rights reserved. Design       by: <a href="http://www.rickyswebtemplates.com">www.rickyswebtemplates.com</a>  </td>    </tr>    <tr>      <td width="100%"> </td>    </tr>    <tr>      <td width="100%"> </td>    </tr>    <tr>      <td width="100%"> </td>    </tr>  </table>  </center></div></body></html>

Share this post


Link to post
Share on other sites
ShadowMage    94
Why is it then that people use tables for designing
Old habits.....learned it from a bad/outdated source....There are a number of reasons one might create a table based layout, but regardless of the reasons, tables should not be used to layout a page. And trust me, you can achieve a lot richer, more manageable effects without them. :)

Share this post


Link to post
Share on other sites
thescientist    231

doesn't mean it's the right way. Just because someone wrote it, doesn't mean it's necessarily good, or worth following. Table were used frequently back for the turn of the century, but the point of CSS was to provide a far better and more flexible way to layout a page. Semantically tables are meant to render data in a tabular format. CSS solely exists to style HTML markup, thus eliminating the need to layout pages in tables.Some other things "wrong" (i.e. not considered best practices) in that template would be inline javacript

<a onMouseOver="if (document.images) document.home.src= 'images/m1_hover.jpg';" onMouseOut="if (document.images) document.home.src= 'images/m1.jpg';" href="index.htm">

that could easily be done with CSS.not to mention the copious of inline style declarations, the seemingly unnecessary uses of   and of course the fact that is was all generated from a WYSIWYG editor. Not exactly what anyone on this board would probably consider "professional" grade. Although it would be a good lesson for those wanting to learn how not to do things.

Share this post


Link to post
Share on other sites
cncr    0
doesn't mean it's the right way. Just because someone wrote it, doesn't mean it's necessarily good, or worth following. Table were used frequently back for the turn of the century, but the point of CSS was to provide a far better and more flexible way to layout a page. Semantically tables are meant to render data in a tabular format. CSS solely exists to style HTML markup, thus eliminating the need to layout pages in tables.Some other things "wrong" (i.e. not considered best practices) in that template would be inline javacript
<a onMouseOver="if (document.images) document.home.src= 'images/m1_hover.jpg';" onMouseOut="if (document.images) document.home.src= 'images/m1.jpg';" href="index.htm">

that could easily be done with CSS.not to mention the copious of inline style declarations, the seemingly unnecessary uses of   and of course the fact that is was all generated from a WYSIWYG editor. Not exactly what anyone on this board would probably consider "professional" grade. Although it would be a good lesson for those wanting to learn how not to do things.

Thnx guysOk now I understand things a bit better regarding tables in layouts....................Now forms:I know that if you want a working 'mailto' form , that PHP is needed ( I dunno that yet :) ), and without it my forms will not work ?? :)

Share this post


Link to post
Share on other sites
thescientist    231

mailto is based on the HTTP protocol and works without forms, but requires that a user have a personal mail client installed on their computer and that it is configured properly. Kind of cheap and dirty, but not really appropriate for "professionals". Forms allow the sending of data to a server side script, like PHP, which has native support for sending mail, through the use of the mail() function, which accesses the web servers outgoing mail server (SMTP - if setup) and will send the email for you. It takes a couple of extra steps but is much more flexible and reliable, and honestly, "less hacky". It's arguably the first thing beginners learn to do with PHP, and makes for a decent enough crash course in learning the language, and gives the basic insight towards interaction between client side and server side.

Edited by thescientist

Share this post


Link to post
Share on other sites
cncr    0
mailto is based on the HTTP protocol and works without forms, but requires that a user have a personal mail client installed on their computer and that it is configured properly. Kind of cheap and dirty, but not really appropriate for "professionals". Forms allow the sending of data to a server side script, like PHP, which has native support for sending mail, through the use of the mail() function, which accesses the web servers outgoing mail server (SMTP - if setup) and will send the email for you. It takes a couple of extra steps but is much more flexible and reliable, and honestly, "less hacky". It's arguably the first thing beginners learn to do with PHP, and makes for a decent enough crash course in learning the language, and gives the basic insight towards interaction between client side and server side.
So I think that you're saying that I cannot use forms ( mailto) on my websites, because I haven't started on the PHP tutorial yet, I know the basics of Html , Xhtml and CssAnd believe me I tries mailto form even with Adobe Destiller ( the one that creates forms ; with buttons )They don't workI wanna Have a form on my site if I'm gonna launch it ; not in a hurry thoughThnx

Share this post


Link to post
Share on other sites
thescientist    231
So I think that you're saying that I cannot use forms ( mailto) on my websites, because I haven't started on the PHP tutorial yet, I know the basics of Html , Xhtml and CssAnd believe me I tries mailto form even with Adobe Destiller ( the one that creates forms ; with buttons )They don't workI wanna Have a form on my site if I'm gonna launch it ; not in a hurry thoughThnx
No, I don't think you're listening to what I'm saying. mailto has absolutely nothing to do with forms. Like I said, it requires a mail client to be installed by the user and requires that they also have outgoing mail configured on their computer. When they click on a mailto link, the browsers will attempt to open up a mail client on their computer for them to compose an email with. All you get is an email pop-up window that you can potentially pre-populate with some information.Forms can be written to interact with a server side scripting language so that information can be sent from the client to the server for processing. In PHP, you have a native mail function that can send email using the servers outgoing mail. You can make a form to get whatever information you want from the user, and have it send an email, or input information into a database, whatever.Perhaps you should just read about them?http://www.w3schools.com/HTML/html_links.asp - mailto example at the bottomhttp://www.w3schools.com/php/php_forms.asp - Forms & PHP http://www.w3schools.com/php/php_forms.asp - PHP mail()

Share this post


Link to post
Share on other sites
cncr    0
No, I don't think you're listening to what I'm saying. mailto has absolutely nothing to do with forms. Like I said, it requires a mail client to be installed by the user and requires that they also have outgoing mail configured on their computer. When they click on a mailto link, the browsers will attempt to open up a mail client on their computer for them to compose an email with. All you get is an email pop-up window that you can potentially pre-populate with some information.Forms can be written to interact with a server side scripting language so that information can be sent from the client to the server for processing. In PHP, you have a native mail function that can send email using the servers outgoing mail. You can make a form to get whatever information you want from the user, and have it send an email, or input information into a database, whatever.Perhaps you should just read about them?http://www.w3schools.com/HTML/html_links.asp - mailto example at the bottomhttp://www.w3schools.com/php/php_forms.asp - Forms & PHP http://www.w3schools.com/php/php_forms.asp - PHP mail()
Okbut when I put a form in my site about whatever and they push the 'submit' button, it is supposed to mail the info to me ( mailto)Never mind, I'll do just what you said; I'll try it again and if I am having the same problems or so you'll hear from me thnx

Share this post


Link to post
Share on other sites
thescientist    231
Okbut when I put a form in my site about whatever and they push the 'submit' button, it is supposed to mail the info to me ( mailto)Never mind, I'll do just what you said; I'll try it again and if I am having the same problems or so you'll hear from me thnx
ok, but just to set the record straight...mailto != submitting a form! two completely different things.edit: you would be better off taking mailto completely off the table and just learning how to use PHP's mail function in conjunction with a form submission. Edited by thescientist

Share this post


Link to post
Share on other sites
cncr    0
ok, but just to set the record straight...mailto != submitting a form! two completely different things.edit: you would be better off taking mailto completely off the table and just learning how to use PHP's mail function in conjunction with a form submission.
Great, because it is confusing.I will have to put PHP on my list of what code to learn next ! :)

Share this post


Link to post
Share on other sites
alphadec    0

I want to create a form.

The page is in .html ext do the form need to use .php or can I just use in form action="that file.php" or do the whole form (page) need to be in php. ?

Hope someone can answer this question.

Share this post


Link to post
Share on other sites
dsonesuk    713

PHP extension is required if you need to process data  sent from form whose method is post or get using $_POST, $_GET, or $_REQUEST.

IF its action is a link to another php page, then the form page can remain html, if it is sent to itself then the form page should be php.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×