There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware network networking outlook outlook 2003 outlook express partition password printer problem ram router slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: How do I 'validate' this?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
4 Me They said!'s Avatar
Computer Specs
Member with 35 posts.
 
Join Date: May 2006
Experience: Intermediate
22-Feb-2007, 09:25 AM #1
Solved: How do I 'validate' this?
Hello all,

Could you please show me how to 'validate this piece.

<a href="mailto:XYZ.com.au">
<div id="emailbar" title="Your E-mail address">
</div>
</a>

Thanks.
GentsBabe's Avatar
Senior Member with 308 posts.
 
Join Date: Jan 2006
Location: Canad-eh :)
Experience: Intermediate
22-Feb-2007, 09:55 AM #2
This is the only way I've known how to do this:
<a href="mailto:yourname@yourdomain.com">yourname@yourdomain.com</a> or you could do:
<a href="mailto:yourname@yourdomain.com">Email me!</a>, whatever you like.

And if you want a pre setup Subject line - to insure it doesn't get thrown into your Junk box:
<a href="mailto:yourname@yourdomain.com?subject=Good%20Morning">Send an email to us</a>

The %20 represents a space, so if you wanted "Concerning your website" then it would be "Concerning%20your%20website".

I'm guessing that the one you had isn't working for 2 reasons:
1. there's no "@" in the email and
2. there's no actual link. It's like typing <a href="http://forums.techguy.org"></a>. Before the </a> part, there needs to be a name in order for the link to show up on a page for someone to be able to click on.

I tried typing it into one of my site's and no link showed up to click on, but when I added it to look like this:
<a href="mailto:XYZ.com.au">
<div id="emailbar" title="Your E-mail address">
</div>mailto:XYZ.com.au</a>
Then it worked.

Hope this helps

Last edited by GentsBabe : 22-Feb-2007 10:09 AM.
4 Me They said!'s Avatar
Computer Specs
Member with 35 posts.
 
Join Date: May 2006
Experience: Intermediate
22-Feb-2007, 10:03 AM #3
Thank you, but that is the 'html code. I am calling a 'css' for positioning, of the 'img' and want it to show that it is a link to be accessed.

I have tried heaps of combinations, but this is the only way it shows that it is a 'clickable link' - W3c will not 'validate' it however!
GentsBabe's Avatar
Senior Member with 308 posts.
 
Join Date: Jan 2006
Location: Canad-eh :)
Experience: Intermediate
22-Feb-2007, 10:14 AM #4
Ok, my bad

I don't know about CSS... would it still have anything to do with not having anything typed in before the </a>?

And yes, I'm guessing now *blushes*

ETA: found this site: Complete Scripts: Form Processing

If you scroll down a little bit, there's a link for "PHP HTML Form Generation and Validation Class". Not sure if this helps you, but I hope so

Last edited by GentsBabe : 22-Feb-2007 10:20 AM.
4 Me They said!'s Avatar
Computer Specs
Member with 35 posts.
 
Join Date: May 2006
Experience: Intermediate
22-Feb-2007, 10:40 AM #5
I tried changing to putting the "mailto:yourname@XYZ.com.au" - It STILL did not 'validate'.

The <a href="mailtoYourname@XYZ.com.au"> BEFORE the <div id="emailbar" title="Your E-mail address"></div> and the 'closing' of the 'anchor' </a> AFTER the </div> is the only way that the "img" in the 'external 'css' file becomes 'active' - Yet it does not 'validate'.

If it is not written the above way, then it is NOT an active 'link' - The external 'css' file is used on 175 pages, EACH with 175 different 'e-mail' link addresses, so I can't put it externally??

This is the message I get when I try to 'validate' it at "w3c"

This page is not Valid HTML 4.01 Transitional!
Below are the results of attempting to parse this document with an SGML parser.
1. Error Line 96 column 55: document type does not allow element "DIV" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag.
<a href="mailto:yourname@XYZ.com.au"><div id="emailbar"></div></a>
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Thanks
GentsBabe's Avatar
Senior Member with 308 posts.
 
Join Date: Jan 2006
Location: Canad-eh :)
Experience: Intermediate
22-Feb-2007, 01:11 PM #6
I did some reading up and I'll admit I didn't understand a bit of it, but one site I went to suggested that having <font> tags messes things up.

Quote:
Font is an element level tag, but div and h tags are block level (think paragraph), which is why they can't be contained within FONT tags. Hence your validation problem... But you really shouldn't be using font tags at all. They're deprecated, which means they may still work in browsers now but there are other (better) ways of doing what they do and future browsers may not recognise them.
Do you have <font> tags on your page?

Another site had more info, but too much to copy and paste, so here: Open Cube forum

If you want to read everything from the first site I posted: lists.evolt.org -archives

I hope someone comes along who does know this stuff and helps you better because I'm way over my head in this . I'm trying tho
Gibbs's Avatar
Senior Member with 638 posts.
 
Join Date: Feb 2005
Location: England
Experience: Intermediate
23-Feb-2007, 08:34 AM #7
What/where is your CSS/HTML code? That would help
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,250 posts.
 
Join Date: Oct 2006
24-Feb-2007, 12:38 AM #8
you can't put some tags inside of others.

I need to see your css code to know what you want.
4 Me They said!'s Avatar
Computer Specs
Member with 35 posts.
 
Join Date: May 2006
Experience: Intermediate
27-Feb-2007, 12:46 AM #9
Hi Gibbs,
This is in my 'head' section. -- <link rel="stylesheet" href="index-ff.css" type="text/css"/>

Hi MMJ,
This is in my .css file, -- #emailbar {
background:transparent;
position:absolute;
background: url(images/email1.gif);
width:89px;
height:26px;
left:520px;
top:860px;
color:#191970;
}

I want to make the 'url' active, but it needs to be active from the .html page, as they all have different 'e-mail addresses'.

This seems to be the only way I can make the 'src img=' active, (in the .html page) but it won't validate in w3c!! -- <a href="mailto:yourname@.com.au?subject="Your name page enquiry!">
<div id="emailbar" title="E-mail - Your E-mail address here"></div> </a>
--

Is there another way.

Thanks and sorry for delay.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,250 posts.
 
Join Date: Oct 2006
27-Feb-2007, 02:53 AM #10
"active"?

what exactly are you trying to accomplish here? Why can't you just apply the style to the link?
4 Me They said!'s Avatar
Computer Specs
Member with 35 posts.
 
Join Date: May 2006
Experience: Intermediate
01-Mar-2007, 06:47 AM #11
To MMJ,
I have 2 documents. One of them is an .html file the other is a .css file.
In the .html file I have placed a "div" and in that "div" I requested a 'style' and I called it "emailbar" - With me so far?
The "emailbar" 'id' was asked to display an 'img' (url (images/email1.gif)) - the specifics are contained in the .css file. (see earlier post)

Now in the .html file I need someone to 'click' onto the "email.gif" to send an email to the address on that particular page only, in the .html file. (the 'href')

As I have over 500 pages with the 'email.gif' on, but only about 175 with their 'email' addresses, so far, this method:
--
<a href="mailto:yourname@.com.au?subject="Your name page enquiry!">
<div id="emailbar" title="E-mail - Your E-mail address here"></div> </a>

-- is the only way that I can make the 'email1.gif' active, (i.e you click on the email1.gif and an e-mail goes to the address on THAT particular .html page!) but then the page does not "VALIDATE" when I go through "w3c validation"

- I would like to know how to achieve this and to also have the page "validated"??

If there is another method, then please, an example to try would be better than to ask apparently inane questions. I may then have a chance to "SOLVE" this problem!!

It may be that I am missing something in my interpretation, and I apologise if I appear short, but to date all I have been asked is questions to which I have tried to supply answers , but no one has yet given me an example to try.

Thank you.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,250 posts.
 
Join Date: Oct 2006
01-Mar-2007, 07:41 AM #12
attach email.gif
4 Me They said!'s Avatar
Computer Specs
Member with 35 posts.
 
Join Date: May 2006
Experience: Intermediate
01-Mar-2007, 08:14 AM #13
How do I attach here?
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,250 posts.
 
Join Date: Oct 2006
01-Mar-2007, 08:38 AM #14
Why can't you use
HTML Code:
<a href="mailto:yourname@.com.au?subject="Your name page enquiry!" id="emailbar">
4 Me They said!'s Avatar
Computer Specs
Member with 35 posts.
 
Join Date: May 2006
Experience: Intermediate
01-Mar-2007, 09:08 AM #15
MMJ,

May the good Lord bless your 'cotton socks'

Thank you very much.

IT WORKED!!!

I had not read anywhere that a .css file could be used in a .html file. I thought it could only work in a 'div' instruction.

Thank you for you patience and help.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:44 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.