Not being an web programmer I am unable to figure out how to put the
hyperlink mailto:emailaddress in a button click event. I do not want a
hyperlink on the form. I have found nothing to address this. using
response.redirect is not the answer because you do not return to the page
with the button on it.
Also, is it necessary to encode the address and if yes, how to do that, please
Thanks. I am sure this is very simple but I am a windows programmer not used
to links, html, etc.
--
smHaig 3 18935
That's client-side stuff.
Add an onclick handler to a simple html button, not
a server control, like so: onclick="return OpenMail();"
Then in the javascript on the page, in
client-side script tags, best in the html header:
<script type="text/javascript">
function OpenMail()
{
location.href = "mailto:he**@help.net";
return false;
}
</script>
That should do it.
No encoding should be necessary.
"smHaig" <sm****@discussions.microsoft.com> wrote in message
news:71**********************************@microsof t.com... Not being an web programmer I am unable to figure out how to put the hyperlink mailto:emailaddress in a button click event. I do not want a hyperlink on the form. I have found nothing to address this. using response.redirect is not the answer because you do not return to the page with the button on it. Also, is it necessary to encode the address and if yes, how to do that,
please Thanks. I am sure this is very simple but I am a windows programmer not
used to links, html, etc. -- smHaig
I have used your suggestion which seems clearly the right way, but I have
this error:
handles clause requires withevents qualifier.
where would this go? on the function heading. Or is there a withevents
needed and where would that go?
--
smHaig
"smHaig" wrote: Not being an web programmer I am unable to figure out how to put the hyperlink mailto:emailaddress in a button click event. I do not want a hyperlink on the form. I have found nothing to address this. using response.redirect is not the answer because you do not return to the page with the button on it. Also, is it necessary to encode the address and if yes, how to do that, please
Thanks. I am sure this is very simple but I am a windows programmer not used to links, html, etc. -- smHaig
I had spoken to soon. The problem was that I failed to remove the button
click event for the asp button that I removed when I instead used the html
button. Moral of story: the error message may be accurate but difficult to
decipher--
smHaig
"smHaig" wrote: I have used your suggestion which seems clearly the right way, but I have this error: handles clause requires withevents qualifier.
where would this go? on the function heading. Or is there a withevents needed and where would that go? -- smHaig
"smHaig" wrote:
Not being an web programmer I am unable to figure out how to put the hyperlink mailto:emailaddress in a button click event. I do not want a hyperlink on the form. I have found nothing to address this. using response.redirect is not the answer because you do not return to the page with the button on it. Also, is it necessary to encode the address and if yes, how to do that, please
Thanks. I am sure this is very simple but I am a windows programmer not used to links, html, etc. -- smHaig This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Johnson Jr. |
last post by:
I am trying to handle a button click event, which updates a web control
table with data. The button is dynamically created in the table itself.
When I call updateTable() in the Page_Load the new data from the button is
not available at this time as to allow the table to properly update.
So basically, I need to call UpdateTable() twice, once...
|
by: Mark Lingen |
last post by:
I've found a problem with postback event handling and webcontrol
buttons. Try out the following code in an ASP.Net project and you
will see. Create a web project in VB.Net and drop this code ontop of
the webform1:
Public Class WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
|
by: Sarah |
last post by:
I have code that I want to run so that if the result is true, it changes the
current button's ".DialogResult" property to "DialogResult.OK". Problem is,
when I run this code on the ".Click" event for the current button and then
run this code, if the ".DialogResult" property is change, it does not take
affect until the button is pressed again....
|
by: Robert W. |
last post by:
I'm new to ASP.net programming so excuse my ignorance if the following
question seems overly simplistic.
I've created a simple Login form with 3 primary WebControls:
- A TextBox for the Username
- A TextBox for the Password
- A Button labelled "Submit"
If the user enters a correct username/password combination then he's taken
to another...
|
by: Eric |
last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I
enter text in a box and then press the button, I only get the onChange
event for the text box and not the button's onclick event. But if I
press the button without entering text first, the button click event
does work. What's up?
<html>
<body>
<h3>Events on Buttons and...
| |
by: nraji |
last post by:
hi,
I have designed a web part using VS 2003 (Web control library template). I need to publish that in share point. Its not like drag and drop the things from toolbar. Every thing I need to do in code behind side.
I have a button and text box
Button Id: btnSearch
TextBox id: txtSearch
|
by: =?Utf-8?B?bWFydGluMQ==?= |
last post by:
Hi, All,
I create button in the code ( Dim Button as new Button), not using button
web component (means not drap button and drop it ont he webform), after that
I try to use button_click event, it is not work, anyone can tell how to use
button click event ?
Thanks in advance,
Martin
|
by: GauravGupta |
last post by:
i want to know that is it posible to call button click event before
page load event on post back....
please help me....
|
by: talk2mishal |
last post by:
Hi,
As i m newbie for the Perl With Html Button.
The scenario is like this:
I have HTML button in the perl Script.
I have to get the Data of Enable checkbox Data using the button click event in perl
And I have to copy/cut that Enable checkbox Data to the Other Folder in the SystemAnywhere.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |