PC Review


Reply
Thread Tools Rate Thread

Call a code on click ?? (I think)

 
 
Wayne-I-M
Guest
Posts: n/a
 
      29th Mar 2008
Hi

I got this code from a post from Don (9/28/2004 9:32 AM PST) in this group.
I have been trying to get it to work - but can't :-(

Is it like an access module - do I call it from an OnClick event?

Does it go in the head or the body. I know this will be really simple for a
frontpage expert (which I am "not")

Thank you for your help


<script language=javascript>
<!--
var username = "wayne";
var hostname = "some_domain.com";
var linktext = "Click Here To Send Me a Email";
document.write("<a href=" + "mai" + "lto:" + username + "@" + hostname +
">"
+ linktext + "</a>")
//-->
</script>


--
Wayne
Manchester, England.

 
Reply With Quote
 
 
 
 
Andrew Murray
Guest
Posts: n/a
 
      29th Mar 2008
No, all this script is doing is "fudging" your email address so it can't be
picked up by spammers.

You just insert the entire script, in the <body> section of your Code (turn
to Code View in FP) and paste it to the point where you want the email
address to appear.

Then preview the page (in Browser rather than FP Preview).

You will see it comes up like a normal mailto email link. but if you then
go Right click View Source, you will see the javascript code instead of the
standard mailto a href link.

You don't need to "onclick" or "onLoad" this one, it just runs when you view
the normal HTML page.

Andrew.

"Wayne-I-M" <(E-Mail Removed)> wrote in message
news:9C9F14D2-0DB7-4BB3-BADE-(E-Mail Removed)...
> Hi
>
> I got this code from a post from Don (9/28/2004 9:32 AM PST) in this
> group.
> I have been trying to get it to work - but can't :-(
>
> Is it like an access module - do I call it from an OnClick event?
>
> Does it go in the head or the body. I know this will be really simple for
> a
> frontpage expert (which I am "not")
>
> Thank you for your help
>
>
> <script language=javascript>
> <!--
> var username = "wayne";
> var hostname = "some_domain.com";
> var linktext = "Click Here To Send Me a Email";
> document.write("<a href=" + "mai" + "lto:" + username + "@" + hostname +
> ">"
> + linktext + "</a>")
> //-->
> </script>
>
>
> --
> Wayne
> Manchester, England.
>



 
Reply With Quote
 
Ronx
Guest
Posts: n/a
 
      29th Mar 2008
Its client side JavaScript.

You place it in the body of the page (in code view) where you want a
mailto: link to show.

Example:

<body>
<p> loads of page thingummies here </p>

<p>
<script language=javascript>
<!--
var username = "wayne";
var hostname = "example.com";
var linktext = "Click Here To Send Me a Email";
document.write("<a href=" + "mai" + "lto:" + username + "@" + hostname +
">"
+ linktext + "</a>")
//-->
</script>
</p>

<p> rest of page </p>

</body>


The link will only appear if JavaScript is enabled on the browser.

--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




"Wayne-I-M" <(E-Mail Removed)> wrote in message
news:9C9F14D2-0DB7-4BB3-BADE-(E-Mail Removed):

> Hi
>
> I got this code from a post from Don (9/28/2004 9:32 AM PST) in this group.
> I have been trying to get it to work - but can't :-(
>
> Is it like an access module - do I call it from an OnClick event?
>
> Does it go in the head or the body. I know this will be really simple for a
> frontpage expert (which I am "not")
>
> Thank you for your help
>
>
> <script language=javascript>
> <!--
> var username = "wayne";
> var hostname = "some_domain.com";
> var linktext = "Click Here To Send Me a Email";
> document.write("<a href=" + "mai" + "lto:" + username + "@" + hostname +
> ">"
> + linktext + "</a>")
> //-->
> </script>
>
>
> --
> Wayne
> Manchester, England.


 
Reply With Quote
 
Wayne-I-M
Guest
Posts: n/a
 
      29th Mar 2008
Thank you

--
Wayne
Manchester, England.



"Ronx" wrote:

> Its client side JavaScript.
>
> You place it in the body of the page (in code view) where you want a
> mailto: link to show.
>
> Example:
>
> <body>
> <p> loads of page thingummies here </p>
>
> <p>
> <script language=javascript>
> <!--
> var username = "wayne";
> var hostname = "example.com";
> var linktext = "Click Here To Send Me a Email";
> document.write("<a href=" + "mai" + "lto:" + username + "@" + hostname +
> ">"
> + linktext + "</a>")
> //-->
> </script>
> </p>
>
> <p> rest of page </p>
>
> </body>
>
>
> The link will only appear if JavaScript is enabled on the browser.
>
> --
> Ron Symonds - Microsoft MVP (FrontPage)
> Reply only to group - emails will be deleted unread.
>
> http://www.rxs-enterprises.org/fp
>
>
>
>
> "Wayne-I-M" <(E-Mail Removed)> wrote in message
> news:9C9F14D2-0DB7-4BB3-BADE-(E-Mail Removed):
>
> > Hi
> >
> > I got this code from a post from Don (9/28/2004 9:32 AM PST) in this group.
> > I have been trying to get it to work - but can't :-(
> >
> > Is it like an access module - do I call it from an OnClick event?
> >
> > Does it go in the head or the body. I know this will be really simple for a
> > frontpage expert (which I am "not")
> >
> > Thank you for your help
> >
> >
> > <script language=javascript>
> > <!--
> > var username = "wayne";
> > var hostname = "some_domain.com";
> > var linktext = "Click Here To Send Me a Email";
> > document.write("<a href=" + "mai" + "lto:" + username + "@" + hostname +
> > ">"
> > + linktext + "</a>")
> > //-->
> > </script>
> >
> >
> > --
> > Wayne
> > Manchester, England.

>
>

 
Reply With Quote
 
Wayne-I-M
Guest
Posts: n/a
 
      29th Mar 2008
Thank you

--
Wayne
Manchester, England.



"Andrew Murray" wrote:

> No, all this script is doing is "fudging" your email address so it can't be
> picked up by spammers.
>
> You just insert the entire script, in the <body> section of your Code (turn
> to Code View in FP) and paste it to the point where you want the email
> address to appear.
>
> Then preview the page (in Browser rather than FP Preview).
>
> You will see it comes up like a normal mailto email link. but if you then
> go Right click View Source, you will see the javascript code instead of the
> standard mailto a href link.
>
> You don't need to "onclick" or "onLoad" this one, it just runs when you view
> the normal HTML page.
>
> Andrew.
>
> "Wayne-I-M" <(E-Mail Removed)> wrote in message
> news:9C9F14D2-0DB7-4BB3-BADE-(E-Mail Removed)...
> > Hi
> >
> > I got this code from a post from Don (9/28/2004 9:32 AM PST) in this
> > group.
> > I have been trying to get it to work - but can't :-(
> >
> > Is it like an access module - do I call it from an OnClick event?
> >
> > Does it go in the head or the body. I know this will be really simple for
> > a
> > frontpage expert (which I am "not")
> >
> > Thank you for your help
> >
> >
> > <script language=javascript>
> > <!--
> > var username = "wayne";
> > var hostname = "some_domain.com";
> > var linktext = "Click Here To Send Me a Email";
> > document.write("<a href=" + "mai" + "lto:" + username + "@" + hostname +
> > ">"
> > + linktext + "</a>")
> > //-->
> > </script>
> >
> >
> > --
> > Wayne
> > Manchester, England.
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call a command button click event from code tsison7 Microsoft Access VBA Modules 5 23rd Jan 2008 02:25 AM
Call click event via code? C# Tony Microsoft C# .NET 10 24th Sep 2006 09:30 PM
How to make double click event to call and execute the mouseup event code techsatish@gmail.com Microsoft VB .NET 2 25th Aug 2006 05:43 PM
How to make double click event to call and execute the mouseup event code techsatish@gmail.com Microsoft Dot NET Framework Forms 0 25th Aug 2006 04:26 AM
disable call waiting on a local call puts in area code JMB Windows XP Print / Fax 0 16th Feb 2004 11:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:58 PM.