471,119 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,119 software developers and data experts.

HTML anchor ServerClick

I'm trying to find a simple script for hiding my email until the user
chooses to
send a message. I thought I might be able to do this with the ServerClick
event on
the HTML anchor, setting the valid url there. What happens is that some
JavaScript
code is added, and the url is replaced by call to a "__doPostBack"
function:
href="javascript:__doPostBack('MailBtn','')". All that happens when the link
is clicked
is a reload. What is this function? Somebody know a better way to do this (I
really
don't want to use a cumbersome form).

<script runat="server">
void EmailAnchor_Click(Object sender, EventArgs e)
{
MailLink.HRef = "mailto:my*****@mindspring.com";
}
</script>

<a id="MailLink" href="mailto:me@nospam.net"
OnServerClick="EmailAnchor_Click" runat="server">


Nov 18 '05 #1
0 2811

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Arthur Pratz | last post: by
5 posts views Thread by JP | last post: by
6 posts views Thread by schleichv | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.