Hi All,
Does anyone know how to execute a hyperlink programically? I need to create
and send an email message, but I need to have the default mail editor loaded
and populated with the message details and then have the user click on send.
'Mailto:' would work great if I could get it to fire automatically without
the user having to click on a link.
Any ideas?
Thanks
Ian 10 2547
Is this what you're looking for? There might be a different parameter that
allows to initialize the body, but I'm not aware of it.
<a href="mailto:yo*@you.com?Subject=Hello">Email you</a>
-Brock
DevelopMentor http://staff.develop.com/ballen Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message details and then have the user click on send. 'Mailto:' would work great if I could get it to fire automatically without the user having to click on a link. Any ideas?
Thanks Ian
Hi,
Sorry I wasn't clear. I know how to for the URL for the mailto, I just
don't know how to get .NET to execute a hyperlink without someone actually
having to click on it.
Thanks
Ian
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:21**********************@msnews.microsoft.com ... Is this what you're looking for? There might be a different parameter that allows to initialize the body, but I'm not aware of it.
<a href="mailto:yo*@you.com?Subject=Hello">Email you</a>
-Brock DevelopMentor http://staff.develop.com/ballen Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message details and then have the user click on send. 'Mailto:' would work great if I could get it to fire automatically without the user having to click on a link. Any ideas?
Thanks Ian
Ah! Apparently there is[1]: "body". Duh.
[1] http://www.faqs.org/rfcs/rfc2368.html
-Brock
DevelopMentor http://staff.develop.com/ballen Is this what you're looking for? There might be a different parameter that allows to initialize the body, but I'm not aware of it.
<a href="mailto:yo*@you.com?Subject=Hello">Email you</a>
-Brock DevelopMentor http://staff.develop.com/ballen Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message details and then have the user click on send. 'Mailto:' would work great if I could get it to fire automatically without the user having to click on a link. Any ideas? Thanks Ian
See http://www.w3schools.com/html/tryit....ryhtml_mailto2 for
mailto: option.
To click automatically on href, try some javascript stuff.
May be something like this:
window.location.href="mailto:..."
Lionel.
"Ian Kelly" <in**@thetawave.on.ca> a écrit dans le message de news:
uL****************@TK2MSFTNGP09.phx.gbl... Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message details and then have the user click on send. 'Mailto:' would work great if I could get it to fire automatically without the user having to click on a link.
Any ideas?
Thanks Ian
window.open works:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script language="javascript">
function Foo()
{
window.open("mailto:ba****@develop.com");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<a href="javascript :Foo()">Foo</a>
</form>
</body>
</html>
-Brock
DevelopMentor http://staff.develop.com/ballen Hi, Sorry I wasn't clear. I know how to for the URL for the mailto, I just don't know how to get .NET to execute a hyperlink without someone actually having to click on it. Thanks Ian "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message news:21**********************@msnews.microsoft.com ... Is this what you're looking for? There might be a different parameter that allows to initialize the body, but I'm not aware of it.
<a href="mailto:yo*@you.com?Subject=Hello">Email you</a>
-Brock DevelopMentor http://staff.develop.com/ballen Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message details and then have the user click on send. 'Mailto:' would work great if I could get it to fire automatically without the user having to click on a link. Any ideas? Thanks Ian
Idea is to call some client function in body onload procedure. Try to find
some information about running default mail clients trougth client-scripts.
"Ian Kelly" <in**@thetawave.on.ca> wrote in message
news:uL****************@TK2MSFTNGP09.phx.gbl... Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message details and then have the user click on send. 'Mailto:' would work great if I could get it to fire automatically without the user having to click on a link.
Any ideas?
Thanks Ian
Hi All,
First thanks for all the help. I just can not seem to get this to work. I
need to dynamically create the mailto url (no problem there). Then I need
to execute that url from the click event of a button as well as doing other
things. I have been pouring over the online help, but am getting nowhere.
Is it possible to execute a javascript function from the click event of a
button and pass it parameters? Is there a way to launch the default mail
program on the clients machine?
Thanks
Ian
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:21**********************@msnews.microsoft.com ... window.open works:
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <script language="javascript"> function Foo() { window.open("mailto:ba****@develop.com"); } </script> </head> <body> <form id="form1" runat="server"> <a href="javascript:Foo()">Foo</a> </form> </body> </html>
-Brock DevelopMentor http://staff.develop.com/ballen Hi, Sorry I wasn't clear. I know how to for the URL for the mailto, I just don't know how to get .NET to execute a hyperlink without someone actually having to click on it. Thanks Ian "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message news:21**********************@msnews.microsoft.com ... Is this what you're looking for? There might be a different parameter that allows to initialize the body, but I'm not aware of it.
<a href="mailto:yo*@you.com?Subject=Hello">Email you</a>
-Brock DevelopMentor http://staff.develop.com/ballen Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message details and then have the user click on send. 'Mailto:' would work great if I could get it to fire automatically without the user having to click on a link. Any ideas? Thanks Ian
> Is it possible to execute a javascript function from the click event of a button and pass it parameters? Is there a way to launch the default mail program on the clients machine?
Yes; Here's one more try that does both. If this isn't what you want, then
I'm at a loss. Sorry.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script language="javascript">
function SendMail(to, subject, body)
{
window.open("mailto:" + to + "?subject=" + subject + "&body="
+ body);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<input type="button" onclick="SendMail('b*****@develop.com', 'hello',
'some body')" value="Send Mail To Brock" />
</form>
</body>
</html>
-Brock
DevelopMentor http://staff.develop.com/ballen
Can you not just use the format suggested earlier:
<script language="javascript">
function Foo()
{
window.open("mailto:bal...@develop.com?subject=... ");
}
</script>
In the button's click handler:
a) build the mailto url dynamically with a stringbuilder or
string.format()
b) build a dummy javascript function to wrap it, as in the above
example
c) use RegisterScript (or RegisterBlock, or RegisterScriptBlock..
havn't done this in a while) to write the script to your html page on
postback
d) programatically grab a reference to the page's body tag and add an
"onload" attribute that fires your dummy function
"spinthemoose" <da***@spinthemoose.com> wrote in message news:<11**********************@l41g2000cwc.googleg roups.com>... c) use RegisterScript (or RegisterBlock, or RegisterScriptBlock.. havn't done this in a while) to write the script to your html page on postback
"Insert the script block programmatically. To do this, use either the
Page.RegisterStartupScript() or the Page.RegisterClientScriptBlock()
method. In the first case, the JavaScript code will execute
immediately the next time the page is posted back. In the latter case,
the JavaScript code will not execute unless you connect the
client-side event of another control to the JavaScript function. In
this article, we'll use the first approach."
- http://www.ondotnet.com/pub/a/dotnet...15/aspnet.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bill |
last post by:
I'm sending an autoresponder to our customers, through the php mail
function. However, when I add a hyperlink into the $message, instead
of a live link appearing, all that appears is the html code,...
|
by: Zaidan |
last post by:
I am running Excel2000 under WIN98 2nd edition, and I am writing a VBA
code (I will consider using javascript if I have to) that does the
following, at the user command:
1- Start MS Explorer and...
|
by: Mr. x |
last post by:
Hello,
I am sending emails with Hebrew contents.
When receiving emails - I cannot see the Hebrew characters (it is not
outlook express configuration, because when receiving emails from friends -...
|
by: Peter Afonin |
last post by:
Hello,
I created an e-mail form pretty much as described in this article:
http://www.4guysfromrolla.com/webtech/080801-1.shtml. It works great, but I
cannot figure out one thing:
I need to...
|
by: mc |
last post by:
I would like to be able to send from an ASP.NET page an email which when recieved takes the form of
a "Sharing Invitation for a RSS Feed"...
| |
by: JJ297 |
last post by:
Could someone please tell me what I'm doing wrong?
When I click on the submit button under button click I have the
following code to send a generated email. I want to capture the
QuesID from...
|
by: Phasma |
last post by:
Hi
I'm pretty new to access and am a bit stuck on the following.
I have a table which contains a field called and is set to hyperlink. The form I use to input data has a text box bound to this...
|
by: JoeP |
last post by:
Hi All,
How can I find the reason for such an error: Failure sending mail.
Some Code...
oMailMessage.IsBodyHtml = False
oMailMessage.Body = cEmailBody
Dim oSMTP As New SmtpClient...
|
by: =?Utf-8?B?R3V5IENvaGVu?= |
last post by:
Hi all
I use:
Dim message As New MailMessage(txtTo.Text, txtFrom.Text, txtSubject.Text,
txtBody.Text)
Dim emailClient As New SmtpClient(txtSMTPServer.Text)
emailClient.Send(message)
And its...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |