Hi Guys
Hope you had a nice holiday.
I have a question for you:
As a long time Pascal programmer I find I have a lot of trouble with the seemingly undisciplined and unstructured nature of HTML, and JS isn't, to my eyes, much better.
There seem to me to be no rules about what, or in what order you can include elements within tags. Reference is often made to "backend" mechanisms that take care of certain things, but I've yet to find a comprehensive list of what they are and what they do. At the moment, I'm having real trouble dealing with the notion that the simple instruction "mailto:" included within a form's declaration will take the
forms subsequent input and e-mail it to the named party.
I start to worry about, the how, the when, and in what form this input is e-mailed. Can I parse it first? How? At what point?
Enough! I've actually got a working website, but done in the most basic possible way, and using methods which, I've now been told, are already out of date and really not worth learning more of.
There are so many guru's out there, each pushing their own spin on the best way to do things, what is important, and where the future lies. Since they are mostly free, I can hardly ask for my money back . .
So I guess I'm asking for a little grounded guidance here. Do you know any books or tutorials that actually discuss things, instead of just skipping across the surface?
Anyone? . . . Anyone at all?
.
A more in-depth discussion
Moderator: kfury77
Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
Please try to follow these guidelines. This will help to receive faster and more accurate response.
- Check the Support section of the corresponding product first. Chances are you will find your answer there;
- Do not create new topics for already reported problems. Add your comments to the existing topics instead;
- Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
- Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
- Include the version number of the software you are using;
- This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Hi Anthony,
Blimey, Pascal hey, I remeber (well not so much the code) doing Pascal for my A-Level Computing Science course at college.
HTML does have a structure to follow, very very basically it is:
And when using HTML tags you must close them in the correct order:
<a href="index.htm"><b><i>This is a link</i></b></a> is correct
<a href="index.htm"><b><i>This is a link</a></b></i> (*) is not correct
But elements within tags can be in any order:
<img src="logo.gif alt="Company Logo"> and
<img alt="Company Logo" src="logo.gif> are both allowed.
The problem with HTML is that some browsers (mainly MS Internet Explorer) will allow you to write incorrectly structured code and it will "kind of" correct it for you (or ignore the errors and do what it thinks it should be). This causes problems as "better" browsers will show these errors rather than ignore them.
For example, Internet Explorer will probably show the above (*) incorrect code as correct where as other browsers might not close the link (<a> tag) and so all the text afterwards becomes part of the link.
"backend" mechanisms (as you put them) or Server Side Scripts handle pre or post processing of an HTML page.
A good example is a shopping cart, the pre-processing is where the web server creates the list of items in your shopping cart, and generates the HTML for the browser.
And post-processing is where you click the "add to cart" button and the web server will add that new item to your shopping cart.
Examples of Server Side Scipt langiages are ASP/ASP.net/PHP/perl (cgi)/PHP/Cold Fusion.
Ref your "mailto:" query.
When using "mailto:" on a form, this is all handled client side (in the web browser) so it's impossible to parse it before it's sent.
What basically happens is it will fire-up the users e-mail client with your mailto:address in the "to:" field, create a small text file containing the contents of the form, and wait for them to press the send button.
And it's not always guaranteed to work as it will often not launch the e-mail client.
This is where you'd use some Server Side Scripting, you's set the action of your form to point to your script:
When the submit button is pressed, all the values in the form fields are passed to your script, and you can process them from there, and send an email or store in a database for example.
I would recommend the book HTML, XHTML, and CSS, Sixth Edition: Visual QuickStart Guide by Elizabeth Castro. I find her books very good and easy to follow, and learnt everything I know about perl from her perl book:
http://www.cookwood.com/html6ed/
Hope that helps for starers.
Cheers
Mike
Blimey, Pascal hey, I remeber (well not so much the code) doing Pascal for my A-Level Computing Science course at college.
HTML does have a structure to follow, very very basically it is:
Code: Select all
<html>
<head>
</head>
<body>
</body>
</html>
<a href="index.htm"><b><i>This is a link</i></b></a> is correct
<a href="index.htm"><b><i>This is a link</a></b></i> (*) is not correct
But elements within tags can be in any order:
<img src="logo.gif alt="Company Logo"> and
<img alt="Company Logo" src="logo.gif> are both allowed.
The problem with HTML is that some browsers (mainly MS Internet Explorer) will allow you to write incorrectly structured code and it will "kind of" correct it for you (or ignore the errors and do what it thinks it should be). This causes problems as "better" browsers will show these errors rather than ignore them.
For example, Internet Explorer will probably show the above (*) incorrect code as correct where as other browsers might not close the link (<a> tag) and so all the text afterwards becomes part of the link.
"backend" mechanisms (as you put them) or Server Side Scripts handle pre or post processing of an HTML page.
A good example is a shopping cart, the pre-processing is where the web server creates the list of items in your shopping cart, and generates the HTML for the browser.
And post-processing is where you click the "add to cart" button and the web server will add that new item to your shopping cart.
Examples of Server Side Scipt langiages are ASP/ASP.net/PHP/perl (cgi)/PHP/Cold Fusion.
Ref your "mailto:" query.
When using "mailto:" on a form, this is all handled client side (in the web browser) so it's impossible to parse it before it's sent.
What basically happens is it will fire-up the users e-mail client with your mailto:address in the "to:" field, create a small text file containing the contents of the form, and wait for them to press the send button.
And it's not always guaranteed to work as it will often not launch the e-mail client.
This is where you'd use some Server Side Scripting, you's set the action of your form to point to your script:
Code: Select all
<form action="myscript.asp">
<input type="text" name="firstname">
<input type="Submit">
</form>
I would recommend the book HTML, XHTML, and CSS, Sixth Edition: Visual QuickStart Guide by Elizabeth Castro. I find her books very good and easy to follow, and learnt everything I know about perl from her perl book:
http://www.cookwood.com/html6ed/
Hope that helps for starers.
Cheers
Mike