Jump to content

Tables, lists and Forms


cncr
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 : :(
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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. :)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ?? :)
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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()
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 ! :)
Link to comment
Share on other sites

  • 6 years later...

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
Link to comment
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
 Share

×
×
  • Create New...