Confused over serside script

  • Thread starter Thread starter Wayne-I-M
  • Start date Start date
W

Wayne-I-M

Hi

I am confused

I got this code from
http://reliableanswers.com/js/mailme.asp

But is (e-mail address removed) the e mail address that the mail will go to and if
it is is it not very easy for a spider to find this??

What is the point is scripting the address lower down it is it shown clearly
higher up.

V strange - I am almost certainly misunderstanding this script




<%
Function mailMe(sAddress, sCaption, sTitle)
'=mailMe("(e-mail address removed)","Display","Title")
Dim sBuild, sSplit, sSplit2, sMailMe
sSplit = Split(sAddress, "@", 2)
If InStr(1, sSplit(1), "?", 1) > 0 Then
sSplit2 = Split(sSplit(1), "?", 2)
sMailMe = "mailMe('" _
& Server.URLEncode( sSplit2(0) ) & "?" _
& Replace( sSplit2(1), "'", "\'") & "','" _
& Server.URLEncode( Replace( sSplit(0), ".", "#") ) _
& "')"
Else
sMailMe = "mailMe('" _
& Server.URLEncode( sSplit(1) ) _
& "','" _
& Server.URLEncode( Replace( sSplit(0), ".", "#") ) _
& "')"
End If
sBuild = "onmouseover=""javascript:this.href=" _
& sMailMe & ";"" " _
& "onfocus=""javascript:this.href=" _
& sMailMe & ";"""
sBuild = "<a href=""/contact/"" " _
& sBuild _
& " title=""" & sTitle & """>"
If sCaption = "" Then
sBuild = sBuild & sSplit(0)
Else
sBuild = sBuild & sCaption
End If
mailMe = sBuild & "</a>"
End Function
%>
 
The point is that because this is server-side script, it will only be seen
on the server. In other words, this should not be passed to the client
browser at all. It is just a piece of script that the server will compile
and attempt to work with as needed. So in this case, (e-mail address removed) is the
email address the mail would be sent to, but the data is executed on the
server and the code will not be sent to the browser at all.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
 
Thanks Mark

Do I insert this code (and the other) on that site into my web page or do I
need to send it to our web host.

Sorry but I am confused by this whole thing.

LoL you will be happy to know that I we have just got copy of expression
studio so in a few weeks there should be a few less dumb questions in this
forum :-)

--
Wayne
Manchester, England.



Mark Fitzpatrick said:
The point is that because this is server-side script, it will only be seen
on the server. In other words, this should not be passed to the client
browser at all. It is just a piece of script that the server will compile
and attempt to work with as needed. So in this case, (e-mail address removed) is the
email address the mail would be sent to, but the data is executed on the
server and the code will not be sent to the browser at all.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
 
You insert it in code view on your page and run it on a server that supports ASP

--

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


| Thanks Mark
|
| Do I insert this code (and the other) on that site into my web page or do I
| need to send it to our web host.
|
| Sorry but I am confused by this whole thing.
|
| LoL you will be happy to know that I we have just got copy of expression
| studio so in a few weeks there should be a few less dumb questions in this
| forum :-)
|
| --
| Wayne
| Manchester, England.
|
|
|
| "Mark Fitzpatrick" wrote:
|
| > The point is that because this is server-side script, it will only be seen
| > on the server. In other words, this should not be passed to the client
| > browser at all. It is just a piece of script that the server will compile
| > and attempt to work with as needed. So in this case, (e-mail address removed) is the
| > email address the mail would be sent to, but the data is executed on the
| > server and the code will not be sent to the browser at all.
| >
| > Hope this helps,
| > Mark Fitzpatrick
| > Microsoft MVP - Expression
| >
| > | > >
| > > Hi
| > >
| > > I am confused
| > >
| > > I got this code from
| > > http://reliableanswers.com/js/mailme.asp
| > >
| > > But is (e-mail address removed) the e mail address that the mail will go to and if
| > > it is is it not very easy for a spider to find this??
| > >
| > > What is the point is scripting the address lower down it is it shown
| > > clearly
| > > higher up.
| > >
| > > V strange - I am almost certainly misunderstanding this script
| > >
| > >
| > >
| > >
| > > <%
| > > Function mailMe(sAddress, sCaption, sTitle)
| > > '=mailMe("(e-mail address removed)","Display","Title")
| > > Dim sBuild, sSplit, sSplit2, sMailMe
| > > sSplit = Split(sAddress, "@", 2)
| > > If InStr(1, sSplit(1), "?", 1) > 0 Then
| > > sSplit2 = Split(sSplit(1), "?", 2)
| > > sMailMe = "mailMe('" _
| > > & Server.URLEncode( sSplit2(0) ) & "?" _
| > > & Replace( sSplit2(1), "'", "\'") & "','" _
| > > & Server.URLEncode( Replace( sSplit(0), ".", "#") ) _
| > > & "')"
| > > Else
| > > sMailMe = "mailMe('" _
| > > & Server.URLEncode( sSplit(1) ) _
| > > & "','" _
| > > & Server.URLEncode( Replace( sSplit(0), ".", "#") ) _
| > > & "')"
| > > End If
| > > sBuild = "onmouseover=""javascript:this.href=" _
| > > & sMailMe & ";"" " _
| > > & "onfocus=""javascript:this.href=" _
| > > & sMailMe & ";"""
| > > sBuild = "<a href=""/contact/"" " _
| > > & sBuild _
| > > & " title=""" & sTitle & """>"
| > > If sCaption = "" Then
| > > sBuild = sBuild & sSplit(0)
| > > Else
| > > sBuild = sBuild & sCaption
| > > End If
| > > mailMe = sBuild & "</a>"
| > > End Function
| > > %>
| > >
| > > --
| > > Wayne
| > > Manchester, England.
| > >
| >
 
Thank you Mark and Stefan
--
Wayne
Manchester, England.



Stefan B Rusynko said:
You insert it in code view on your page and run it on a server that supports ASP

--

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


| Thanks Mark
|
| Do I insert this code (and the other) on that site into my web page or do I
| need to send it to our web host.
|
| Sorry but I am confused by this whole thing.
|
| LoL you will be happy to know that I we have just got copy of expression
| studio so in a few weeks there should be a few less dumb questions in this
| forum :-)
|
| --
| Wayne
| Manchester, England.
|
|
|
| "Mark Fitzpatrick" wrote:
|
| > The point is that because this is server-side script, it will only be seen
| > on the server. In other words, this should not be passed to the client
| > browser at all. It is just a piece of script that the server will compile
| > and attempt to work with as needed. So in this case, (e-mail address removed) is the
| > email address the mail would be sent to, but the data is executed on the
| > server and the code will not be sent to the browser at all.
| >
| > Hope this helps,
| > Mark Fitzpatrick
| > Microsoft MVP - Expression
| >
| > | > >
| > > Hi
| > >
| > > I am confused
| > >
| > > I got this code from
| > > http://reliableanswers.com/js/mailme.asp
| > >
| > > But is (e-mail address removed) the e mail address that the mail will go to and if
| > > it is is it not very easy for a spider to find this??
| > >
| > > What is the point is scripting the address lower down it is it shown
| > > clearly
| > > higher up.
| > >
| > > V strange - I am almost certainly misunderstanding this script
| > >
| > >
| > >
| > >
| > > <%
| > > Function mailMe(sAddress, sCaption, sTitle)
| > > '=mailMe("(e-mail address removed)","Display","Title")
| > > Dim sBuild, sSplit, sSplit2, sMailMe
| > > sSplit = Split(sAddress, "@", 2)
| > > If InStr(1, sSplit(1), "?", 1) > 0 Then
| > > sSplit2 = Split(sSplit(1), "?", 2)
| > > sMailMe = "mailMe('" _
| > > & Server.URLEncode( sSplit2(0) ) & "?" _
| > > & Replace( sSplit2(1), "'", "\'") & "','" _
| > > & Server.URLEncode( Replace( sSplit(0), ".", "#") ) _
| > > & "')"
| > > Else
| > > sMailMe = "mailMe('" _
| > > & Server.URLEncode( sSplit(1) ) _
| > > & "','" _
| > > & Server.URLEncode( Replace( sSplit(0), ".", "#") ) _
| > > & "')"
| > > End If
| > > sBuild = "onmouseover=""javascript:this.href=" _
| > > & sMailMe & ";"" " _
| > > & "onfocus=""javascript:this.href=" _
| > > & sMailMe & ";"""
| > > sBuild = "<a href=""/contact/"" " _
| > > & sBuild _
| > > & " title=""" & sTitle & """>"
| > > If sCaption = "" Then
| > > sBuild = sBuild & sSplit(0)
| > > Else
| > > sBuild = sBuild & sCaption
| > > End If
| > > mailMe = sBuild & "</a>"
| > > End Function
| > > %>
| > >
| > > --
| > > Wayne
| > > Manchester, England.
| > >
| >
 
Back
Top