473,753 Members | 8,077 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send to A Friend And Java Problem

I can't figure out why this script won't insert the subject in the email and
why can't I control the font and size being used? I'm not sure where to post
this. Let me know where if this is OT.
<SCRIPT LANGUAGE="JavaS cript">
<!-- Begin
function isPPC() {
if (navigator.appV ersion.indexOf( "PPC") != -1) return true;
else return false;
}
if(isPPC()) {
document.write( '<b>Send <A CLASS="contact" HREF=\"mailto:\ ?subject\=Take a
look at website I found.?body=You can see this website at
http://www.BrokerAgent Training.com\" onMouseOver="wi ndow.status=\'S end your
friends e-mail about this website\'; return true" TITLE="Send your friends
e-mail about this website">this website<\/A> to a friend</b>');
}
else { document.write( '<b>Send <A CLASS="contact" HREF=\"mailto:\ ?body\=Take
a look at this website I found. You can see this website at
http://www.BrokerAgent Training.com\" onMouseOver="wi ndow.status=\'S end your
friends e-mail about this website\'; return true" TITLE="Send your friends
e-mail about this website">this website<\/A> to a friend</b>');
}
// End -->
</script>
--
Warmest regards,

Steve Horrillo, Realtor / CEO / C.Ht.
http://brokeragenttraining.com (Advanced training for real estate
professionals)
http://over100percent.com (Realtors earn over 100 percent
http::/hipfsbo.com (a helpful place for the serious home seller or buyer who
is open to new ideas)
Jul 23 '05
15 3315
Dan
Lasse Reichstein Nielsen wrote:
3.Towards the end you put "<\/a>" instead of </a>


That is correct. You should always escape the sequence "</" when
it occurs inside a script element. He should do the same for "</b>".


This is one of three levels of escaping which need to be done here.
Also, to conform with the URI specs, all spaces in the "mailto:" URI
need to be escaped as %20, and there may be other characters which also
need to be escaped. Furthermore, under the HTML specs, any ampersands
in the URI need to be HTML-escaped as &amp;.

--
Dan

Jul 23 '05 #11
Lasse Reichstein Nielsen wrote:
<snip>
He wrote "<!-- Begin". That is at least a valid HTML comment starter.

There is no reason to have "<!--" in the script element at all, so it
should not be commented, just removed.

If it is not removed, it must be assumed that the author intends it to
work as an HTML comment for browsers not understanding that the script
element content should not be rendered (which includes pretty much no
browser newer than Netscape 2). For that purpose, there should not be
anything outside of the HTML comment, so there should not be slashes
in front of it.

<snip>
Corrent it should not have the '//' before the HTML comment if within
the SCRIPT tage, where it should have gone was before the 'Begin' to
prevent the JavaScript error, i.e.,

<script type="text/javascript">
<!-- //Begin ...

But again as been already noted the HTML comment to hide the script is
obsolete and just should be removed.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jul 23 '05 #12
"Jonathan N. Little" <lw*****@centra lva.net> writes:
<snip>
Corrent it should not have the '//' before the HTML comment if within
the SCRIPT tage, where it should have gone was before the 'Begin' to
prevent the JavaScript error, i.e.,

<script type="text/javascript">
<!-- //Begin ...


The "<--" would be an ECMAScript error too, in pure ECMA 262 ECMAScript,
so the "//" wouldn't make any difference there.

Browsers have extended ECMAScript with the "<--" syntax, and all the
browsers I have seen makes "<--" work just as "//", i.e., a comment
to the end of the line. In these browsers there is no need for "//"
either, so I don't believe it is ever needed.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #13
It was a typo. I fully understand the difference OK?

Warmest regards,

Steve Horrillo
http://stephenhorrillo.com

*** Sent via Developersdex http://www.developersdex.com ***
Jul 23 '05 #14
VK
The border line: mailto pseudo-protocol was used 100's and 1000's of
times to break the domain security over the last 15 years. It has all
imaginable security limitations. It may be the most up-to-date secure
protocol in the Interner :-)

You may want to read this ancient (relatively) thread:
<http://groups-beta.google.com/group/comp.lang.javas cript/browse_frm/thread/2602a35ef4a14ac 1/4d9084137519a2f 2?q=mailto+grou p:comp.lang.jav ascript&rnum=3& hl=en#4d9084137 519a2f2>

Jul 23 '05 #15
VK wrote:
The border line: mailto pseudo-protocol was used 100's and 1000's of
times to break the domain security over the last 15 years.


Rubbish. `mailto:' just does not work; it is not a security issue at all.
PointedEars
Jul 23 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6951
by: mihir | last post by:
does any one have a clue as to how to send a mail via jsp/servlets.
3
3348
by: Erik T. Nomad | last post by:
I've created a link that will enable the reader of any page on my website to click it, enter an e-mail address, and have it arrive in that inbox with a hyperlink to the site. However, I'm wondering if there's a way to customize it further, such that the hyperlink they are sent is the web address of the page the "send to friend" link was on. I don't want to convert my entire site over to .asp, so having a pop-up .asp page seems to make...
12
3253
by: Bryan Parkoff | last post by:
CMain Class is the base class that is initialized in main function. CA Class is the base class that is initialized in CMain::CMain(). CMain Class is always public while CA Class is always private. I have placed "friend void CA::Run_A(void)" in CMain Class. CMain::Run() function attempts to execute CA::Run_A(), but compiler shows an error saying that it is the violation to access private function. I don't understand why because friend...
10
4334
by: Der Andere | last post by:
I've got a problem concerning the << operator. Although I've declared it as a friend function it cannot access the private member of the class AVLtree. Some code: ------------------ class AVLtree { public: friend ostream& operator << (ostream& os, AVLtree& t){}; .... some unimportant stuff ...
2
1964
by: Pablo | last post by:
Hi at all! How can i send a DATA (not a DataTime) Type to a Java WebService? In .NET we have only a DataTime that is incompatible with the Data (calendar) Type of Java! How can i resolve this problem? I can't modify the java web-service and i need to send a simple data!!! AAARGH :P Help me! Tnx at all!
1
4654
by: krndhi1983 | last post by:
Hi to All, I am using Windows XP running IIS 6.0.I am developing a project using vb.net 1.1 with SQL Server 2000.It is a mobile project.So i am also using Pocket PC 2002 with SQL CE 2.0.When I want to Pull the table from SQL Server 2000 to SQL CE the following error will be occured. The Error is the request to send data to the computer running IIS has failed. for more information see HRESULT.MS Active Sync4.0 also been installed in my...
3
3076
by: shybe | last post by:
Ok, Im trying to create a "send this article to a friend" script for my blog, Right now its sending all the articles, but I want it to only send the article in which the form is attached to.
2
3836
by: btcoder | last post by:
Hi, my jsp page uses sun.net.smtp.SmtpClient to send email. It worked fine until the hosted location was moved to another server. Now it generates the sun.net.smtp.SmtpProtocolException and the hosting company can't find what's wrong with it so I'm here hoping somebody can help. The hosting company tried sending email from the server and it was okay and found no restrictions that prevents my page to access the smtp server. What could cause...
1
3129
by: sj7272 | last post by:
Hi, I am building email marketing framework, my email templates go out to clients and I wish to include a "send to a friend" or "forward to a friend" link in the outbound email. I want to track the numbers that take this option, which is no problem, I would just like some guidance on the php mail component of the scripting as I can grab code snippets for the web landing page form. Any guidance appreciated. Thx, Simon
0
9072
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8896
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9653
Oralloy
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9451
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6151
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4771
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3395
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
2
2872
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2284
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.