Forum Moderators: open

Message Too Old, No Replies

Question ID Attribute within an <a> Tag

         

milocold

5:26 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



Greetings,

Quick question, I've got serveral pages hosting a hyperlink that, when clicked, sets the user up to fill out an email (via Outlook or whatever default app).

What I'd like to do is identify which page the email was produced from, or which page the user was on when they decided to click the hyperlink. The first attribute that sprung to mind was "ID", but I'm not certain on how to extract it's value, or place it in the email in a not-so-obvious way (so not to confuse the user).

Is this possible?

Thanks in advance

Justin

Moby_Dim

5:45 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



May be insert a script like this one :

document.write('<p><a href="mailto:admin@yoursite.com?subject=From_' + document.URL + '">mail</a></p>')

or document.title

milocold

5:49 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



Oh, but the subject is already in use. Plus, for the purpose of keeping a tidy look I'd refrain from adding the URL in the subject line. Lord know I don't need to be anymore tacky ;)

Thanks again

Moby_Dim

6:07 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



You may use title, not URL, as were shown. As for "already in use" - you can combine your subj. - add page info in square brackets in the end. You may assign 2-digits id to any page element (e.g. to the same title element ), and use this ID too. You decide ;)

milocold

6:13 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



Cool, thanks. So at the end of the day the Subject line is my only hope, and I can't use the ID attribute? or any META/ Header sections on the email being sent out?