|
|
Post a Project »
Find a Professional HTML Freelancer!
Find a Freelancer to help you with your HTML projects
| |
|
 |
|
|
02-24-2008, 06:44 PM
|
mailto in html
|
Posts: 12
|
I am trying to use the tag "mailto" in an HTML file to prompt the user to email me. Specifically, I want to have the subject and the body of the email message already filled in when the user sends me the email.
So far, I have managed to have a hyperlink where the body is already filled in:
HTML Code:
<a href="mailto::username@gmail.com?body='test'">this works</a>
I have also managed to have a hyperlink where the subject line is already filled in:
HTML Code:
<a href="mailto:usernamegmail.com?subject='the subject'">this works too</a>
But I have yet to figure out how do combine the two:
HTML Code:
<a href="mailto::username@gmail.com?subject='the subject and
the body'?body='test'">help</a>
Does anyone know how to do this?
|
|
|
|
02-24-2008, 07:31 PM
|
Re: mailto in html
|
Posts: 41,508
Name: Chris Hirst
Location: Blackpool. UK
|
can't be done with HTML
some server side code is required
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|
|
|
|
02-24-2008, 07:32 PM
|
Re: mailto in html
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
ok, to start, just a friendly (we are not harsh, here) explanation:
There is no "tags" in html.
You have an "a" node, or element, with an "href" attribute.
I may look like picnitting, but if we all use the same names for the same things, we will understand each others better.
Secondly, I get that you are not very used at web page creation.
No offense, we all started somewhere...
an URL, placed in a href attribute can be composed of several segments.
There are:
°The protocol ( http://, ftp://, file://)
°The subdomain (www)
°The domain (whatever)
°The extension (.com, .org. .net)
°The port (:80)
°The pathname (/page/1.hml)
°The search (?a=1&b=2)
In your case, you want to compose a "search" element into your href attribute.
The fact is, that the ? character is used to delimit the start of the search element.
Every subsequent key=value pairs must be separated by ampersand (&).
So, in your case, you need to use
Code:
<a href="mailto::username@gmail.com?subject='the subject and
the body'&body='test'">help</a>
__________________
Only a biker knows why a dog sticks his head out the window.
|
|
|
|
02-25-2008, 12:24 PM
|
Re: mailto in html
|
Posts: 115
Name: Amber
Location: Mississippi
|
Quote:
Originally Posted by tripy
ok, to start, just a friendly (we are not harsh, here) explanation:
There is no "tags" in html.
|
Now I am very confused.  I am just starting out with learning html, and maybe I have somehow misunderstood them, but every html book and website that I have ever seen calls start and end tags.........."start and end tags." Elements represent headings, paragraphs, hypertext links, lists, embedded media, and a variety of other structures.
|
|
|
|
02-25-2008, 01:24 PM
|
Re: mailto in html
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
well, it seems (to me) that the definition evolved in a relatively short span.
That, and as I tend to relate html to xml (my job), I may have a more "scolar" view over it.
For my, a heading is a <h?> element, or node and attributes (say with me: "there are no alt node on an img element..."  ).
An element in a HTML way of representing it, a node in the DOM document tree (which is an xml tree, by the way).
If you take a look at the w3c defintion of html (say, 4.01) http://www.w3.org/TR/WCAG10-HTML-TECHS/#html-index you will see that there are no reference to any tags. But only elements.
let me just finish by saying that everything is relative, and you should not bound yourself to one strict definition.
My paragraph above was intended to be more informative that formal, sorry if it sorted out like that.
If your book talk about tags, so be it, but take in account that a more recent publication might talk about elements or nodes, and that in this case, they are the same thing.
__________________
Only a biker knows why a dog sticks his head out the window.
Last edited by tripy; 02-25-2008 at 01:26 PM..
|
|
|
|
02-25-2008, 01:26 PM
|
Re: mailto in html
|
Posts: 41,508
Name: Chris Hirst
Location: Blackpool. UK
|
What Thierry is referring to is the fact that "mailto:" is NOT a tag.
It is a value for the href attribute of <a>nchor elements.
A "tag" refers to either the start or end delimiter for an element.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
Last edited by chrishirst; 02-25-2008 at 01:27 PM..
Reason: spelling and grammar corrected
|
|
|
|
02-25-2008, 02:03 PM
|
Re: mailto in html
|
Posts: 115
Name: Amber
Location: Mississippi
|
|
|
|
|
02-25-2008, 02:13 PM
|
Re: mailto in html
|
Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
|
I believe I have figured out why you are so confused tripy. http://www.w3.org/TR/html401/index/elements.html as you can see there the elements, such as h1 (the header 1 element) starts with a <h1> tag and ends with a </h1> tag. http://www.w3.org/html/wg/html5/#elements that there talking about the elements (again, h1 not <h1>) speaks about the nodes in DOM which represent the elements, not the elements as nodes themself. So yes, HTML has elements, but not <h1> is not an element, it is a tag that represents the element to the browser.
__________________
PHP Code:
<?php echo "Hello World"; ?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
|
|
|
|
02-25-2008, 02:57 PM
|
Re: mailto in html
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Quote:
|
I believe I have figured out why you are so confused tripy.
|
I am confused !???
I did not knew.
You know, I will not argue, because it's something too relative, in the end.
It reminds me of Magritte's paint "ceci n'est pas une pipe" (This is not a pipe) which represent a pipe. Meaning that a picture of a pipe is not a pipe.
http://en.wikipedia.org/wiki/The_Treachery_of_Images
I'll just stay to my ground, considering that there are no tags (as for my native language, French, a "tag" relate to something that you add to describe more in detail something else. Close to a label, I believe, in English).
In that view, I compare a tag to a metadata which is attached to something, and in my case, the html element.
This is how all my colleagues both at my work place and over the net are referring to them and it's all I need.
__________________
Only a biker knows why a dog sticks his head out the window.
|
|
|
|
02-25-2008, 03:09 PM
|
Re: mailto in html
|
Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
|
The tags are the labels though. The tag labels/marks how the browser should display or interact with something. The tag <h1> marks that everything after that should be displayed big and bold. The </h1> tag tells it that it should stop displaying things big and bold. The <a> tag indicates that all the things after it are linked to the area the the hypertext reference (href) points to, and that selecting any of them should be rendered as opening that thing that it points to.
__________________
PHP Code:
<?php echo "Hello World"; ?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
|
|
|
|
02-25-2008, 04:33 PM
|
Re: mailto in html
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
I'm not going to say "ok", because I don't share your view upon that.
For me, it's a DOM document, with all it's node from the start. At the moment the server sent it.
You consider it's a description of the representation the browser should create.
I don't say you are wrong, but it's relative, and from my angle, it's an XML (well, SGML in fact) tree from the start.
__________________
Only a biker knows why a dog sticks his head out the window.
|
|
|
|
02-25-2008, 04:33 PM
|
Re: mailto in html
|
Posts: 115
Name: Amber
Location: Mississippi
|
Quote:
Originally Posted by tripy
You know, I will not argue, because it's something too relative, in the end.
It reminds me of Magritte's paint "ceci n'est pas une pipe" (This is not a pipe) which represent a pipe. Meaning that a picture of a pipe is not a pipe.
http://en.wikipedia.org/wiki/The_Treachery_of_Images
|
That is funny!   I have done quite a few trompe l'oeil paintings myself. They really can make you believe that something is there when it's not.
This is really not worth arguing over, but just to add to the discussion, here's how wikipedia defines the tags and elements.
Tags and Elements

|
|
|
|
02-25-2008, 06:46 PM
|
Re: mailto in html
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|

I stand corrected, then.
__________________
Only a biker knows why a dog sticks his head out the window.
|
|
|
|
|
« Reply to mailto in html
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|