Forums

This topic is locked

e-mail "to"

Posted 22 Sep 2006 11:40:58
1
has voted
22 Sep 2006 11:40:58 Marc M posted:
In a detail page I show the e-mailadress of a member which is stored in a database.
By typing "mailto:" in the link field, outloook express opens. But how can I fill in automatically the field "to" in Outlook Express with the e-mail adress of the databank?
Thanks

Replies

Replied 27 Sep 2006 14:04:49
27 Sep 2006 14:04:49 Vince Baker replied:
in the link place the following:

mailto:<%=recordsetname("emailfieldname"%>

(if you are using asp by the way)

you can also add some nice features by filling in the subject and body:

mailto:<%=recordsetname("emailfieldname"%>?subject="This is the subject"&body="this is the body text"

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]
Replied 27 Sep 2006 15:42:56
27 Sep 2006 15:42:56 Marc M replied:
Vince,
Thanks. It works well.
Now I have the same problem with an url.
When there is something like www.adobe.com in the database and in Dreamweaver I write in the link
&lt;%=recordsetname'("websitefieldname)"%&gt;
it doesn't works.
Do I have to store the website with or without "" in the database and what is the correct syntax for the link in DW?
Marc
Replied 27 Sep 2006 15:43:07
27 Sep 2006 15:43:07 Marc M replied:
Vince,
Thanks. It works well.
Now I have the same problem with an url.
When there is something like www.adobe.com in the database and in Dreamweaver I write in the link
&lt;%=recordsetname'("websitefieldname)"%&gt;
it doesn't works.
Do I have to store the website with or without "" in the database and what is the correct syntax for the link in DW?
Marc
Replied 27 Sep 2006 16:51:36
27 Sep 2006 16:51:36 Vince Baker replied:
I would remove the part from the stored url as I think that this is apended to the dynamic link automatically

Just have your code as

href="&lt;%=recorsdset("field"%&gt;

try that

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]
Replied 28 Sep 2006 10:37:17
28 Sep 2006 10:37:17 Marc M replied:
The e-mail link works with
&lt;a href="mailto:&lt;%=Rs_cv("email"%&gt;"&gt;&lt;%=(Rs_cv.Fields.Item("email".Value)%&gt;&lt;/a&gt;
but the website-link doesn't show anything with
&lt;a href="&lt;%=Rs_cv("website"%&gt;"&gt;&lt;%=(Rs_cv.Fields.Item("website".Value)%&gt;&lt;/a&gt;
when for example "www.adobe.com" was stored in the field "website" of the database.

I think I'm doing somtehing very stupid ....
Marc
Replied 28 Sep 2006 11:33:33
28 Sep 2006 11:33:33 Vince Baker replied:
Your code is correct, not sure why this is not working.

Does the actual website address show on the page for you to click? Just to ensure that you are returning a value

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]
Replied 28 Sep 2006 11:40:31
28 Sep 2006 11:40:31 Marc M replied:
Nothing is shown. The field in the browser is empty.
And there are data in the database, because when I write
&lt;%=(Rs_cv.Fields.Item("website".Value)%&gt;
I see for instance www.adobe.com as text in the browser, but of course it doesn't works as a link.
Marc
Replied 28 Sep 2006 11:51:27
28 Sep 2006 11:51:27 Vince Baker replied:
ok,

Just to ensure all is building correctly, select the dynamic text on the page and in the properties inspector below click on the browse for a file icon next to the link textbox.

When the window opens to select a file to link to click on Data Sources. Then browse for your field that holds the web address.

This should ensure that the code is written correctly.

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]
Replied 28 Sep 2006 12:01:18
28 Sep 2006 12:01:18 Marc M replied:
This results in:
in the properties inspector:
&lt;%=(Rs_cv.Fields.Item("website".Value)%&gt;
in the code:
&lt;a href="&lt;%=(Rs_cv.Fields.Item("website".Value)%&gt;"&gt;&lt;%=(Rs_cv.Fields.Item("website".Value)%&gt;&lt;/a&gt;

and still nothing appears in the browser ....

marc
Replied 28 Sep 2006 12:25:57
28 Sep 2006 12:25:57 Vince Baker replied:
in dreamweaver, if you open the recordset and click test do you definately get a record returned?

The code is definately correct now but it appears that no record is being returned from the recordset.

to confirm this further you can add this somewhere in the body of your page:

&lt;% if Rs_cv.eof and Rs_cv.bof then response.write("there are no results from recordset" end if%&gt;

And this will show you if the recordset is returning something or not when the page is being run in the browser

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]
Replied 28 Sep 2006 12:42:42
28 Sep 2006 12:42:42 Marc M replied:
I already found one great mistake.
In my Access-database the field "website" was defined as a hperlink and not as a text.
I changed it and now I see a clickable url in the browser.
But it refers to mysite.be/www.adobe.com .....
with "mysite" the ful path to the map where the database is stored.
Marc
Replied 28 Sep 2006 12:56:31
28 Sep 2006 12:56:31 Vince Baker replied:
add the part back into the link and you will be fine. &lt;%=recordset("field"%&gt; etc

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]
Replied 28 Sep 2006 13:06:33
28 Sep 2006 13:06:33 Marc M replied:
Vince,
Thanks very much for all the help !
It works.
Marc
Replied 28 Sep 2006 14:06:20
28 Sep 2006 14:06:20 Vince Baker replied:
Glad I could help <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]

Reply to this topic