email hyperlink with asp link id in the subject

S

simon

Hi. I'm having a problem constructing a mailto: link with a To and a
subject and body which includes a link to a page in my site with the
database id in the subject.

The body contents contain the page url but it also has to contain the
..asp?id=1

The problem is the frontpage email wont accept the "?"

The mailto link looks something link this

mailto:bob?subject=test?body=http://www.myweb.asp?id=1

but everything stops after the last ?
Grateful if anyone can help

regards
 
S

simon

Steve
I should have been more specific
The mailto link is from a database results form. I'm pulling the To,
Subject & Body from a database. The link in the subject has a page url
and another database field for the database id on the page.
The details in the mailto link are as follows.
The To part is a database results field (an email address)
The subject part is a line of text with a database results field (the
record id)
The body part is a line of text with a page url which finishes with
..asp?id= followed by another database results field (the record id)

if I include the ?id= in the mailto link the subject line finishes at
the end of .asp. If I don't use the ?id= command I can get the record
id to display but the hyperlink won't work because the ?id= is missing.


thanks if you could help again

regards
 
S

simon

Thanks guys but still not there

The actual string is as follows

mailto:<%=FP_FieldURL(fp_rs,"emailaddress")%>?subject=A QMG request has
been marked for your
attention?body=<%http://industrialbusinesscentre/QMG/ViewDetails_copy(1).asp?QMGid=%><%=FP_FieldURL(fp_rs,"QMGid")%>

You can see that I added the tags before and after the url - The
results was a runtime error on the page with a type mismatch on the
'http'
regards
Simon
 
S

Stefan B Rusynko

Bad ASP code
This is a string:
http://industrialbusinesscentre/QMG/ViewDetails_copy(1).asp?QMGid=

So this will throw an error in your code because it is not a string as

body=<%http://industrialbusinesscentre/QMG/ViewDetails_copy(1).asp?QMGid=%>

And ASP has no idea what to do with it

The string code needs to be set as a values and delimited

body=<%="http://industrialbusinesscentre/QMG/ViewDetails_copy(1).asp?QMGid="%>

Better still do as Dave suggests and make it a variable

<%
bodylocation="http://industrialbusinesscentre/QMG/ViewDetails_copy(1).asp?QMGid=" & FP_FieldURL(fp_rs,"QMGid")
%>

And then use

body=<%=bodylocation%>


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Thanks guys but still not there
|
| The actual string is as follows
|
| mailto:<%=FP_FieldURL(fp_rs,"emailaddress")%>?subject=A QMG request has
| been marked for your
| attention?body=<%http://industrialbusinesscentre/QMG/ViewDetails_copy(1).asp?QMGid=%><%=FP_FieldURL(fp_rs,"QMGid")%>
|
| You can see that I added the tags before and after the url - The
| results was a runtime error on the page with a type mismatch on the
| 'http'
| regards
| Simon
|
|
| Steve Easton wrote:
| > I think Dave Berry is on the right track with his answer.
| >
| > --
| > Steve Easton
| > Microsoft MVP FrontPage
| > FP Cleaner
| > http://www.95isalive.com/fixes/fpclean.htm
| > Hit Me FP
| > http://www.95isalive.com/fixes/HitMeFP.htm
| >
| >
| >
| > > Steve
| > > I should have been more specific
| > > The mailto link is from a database results form. I'm pulling the To,
| > > Subject & Body from a database. The link in the subject has a page url
| > > and another database field for the database id on the page.
| > > The details in the mailto link are as follows.
| > > The To part is a database results field (an email address)
| > > The subject part is a line of text with a database results field (the
| > > record id)
| > > The body part is a line of text with a page url which finishes with
| > > .asp?id= followed by another database results field (the record id)
| > >
| > > if I include the ?id= in the mailto link the subject line finishes at
| > > the end of .asp. If I don't use the ?id= command I can get the record
| > > id to display but the hyperlink won't work because the ?id= is missing.
| > >
| > >
| > > thanks if you could help again
| > >
| > > regards
| > >
| > >
| > > Steve Easton wrote:
| > >> Try placing the body portion within quotes so it will be treated as a string.
| > >> mailto:bob?subject=test?body="http://www.myweb.asp?id=1"
| > >>
| > >>
| > >>
| > >> --
| > >> Steve Easton
| > >> Microsoft MVP FrontPage
| > >> FP Cleaner
| > >> http://www.95isalive.com/fixes/fpclean.htm
| > >> Hit Me FP
| > >> http://www.95isalive.com/fixes/HitMeFP.htm
| > >>
| > >>
| > >>
| > >>
| > >> > Hi. I'm having a problem constructing a mailto: link with a To and a
| > >> > subject and body which includes a link to a page in my site with the
| > >> > database id in the subject.
| > >> >
| > >> > The body contents contain the page url but it also has to contain the
| > >> > .asp?id=1
| > >> >
| > >> > The problem is the frontpage email wont accept the "?"
| > >> >
| > >> > The mailto link looks something link this
| > >> >
| > >> > mailto:bob?subject=test?body=http://www.myweb.asp?id=1
| > >> >
| > >> > but everything stops after the last ?
| > >> > Grateful if anyone can help
| > >> >
| > >> > regards
| > >> >
| > >
|
 
S

simon

Thanks. you pointed me in the right direction. in the end I Added the
url to the database that the results were pulled from and used the
Front page results to display a url value and then added the id to the
end of the url.
many thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top