?
Solved

Mailto using document.location="mailto:"

Posted on 2004-04-16
9
Medium Priority
?
1,869 Views
Last Modified: 2011-08-18
Hi

I need to create a Mailto with javascript as a form is submitted

the only problem is as my E-mail message has got larger i get an error message :

"Cannot peform this operation bacause the default mail client is not properly installed"

Now up until the last few words i add to this string it works fone with no erors ... is there a limitt on the amount of text you can add to teh body in this way ???


CODE :

document.location="mailto:"+document.Int.appEmail.value+"?subject=Re: Details - " +Intdate+"&body=Hi " + name + "%0D%0A%0D%0A" + "I just want to confirm details" + "%0D%0A%0D%0A" + "ONE: " + document.Int.ONE.value + " and the TWO is:" + "%0D%0A%0D%0A" + document.Int.TWO.value + "%0D%0A%0D%0A" + "the item is : " + Intdate + " with " + document.Int.int2.value + ", " + document.Int.int2t.value + "%0D%0A%0D%0A" + "Comments: " + document.Int.intcomments.value + "%0D%0A%0D%0A" + "Shiiping Code: " + document.Int.Code.value + "%0D%0A%0D%0A" + " Kind Regards"
0
Comment
Question by:itimes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
9 Comments
 
LVL 4

Assisted Solution

by:caner_elci
caner_elci earned 90 total points
ID: 10841066
try this window.open instead.. for example:

<html>
<script language=javaScript>
function doIt()
{
window.open("mailto:caner_elci@mail.address?subject=Re: Details&body=Hi Caner%0D%0A%0D%0AI just want to confirm details%0D%0A%0D%0AKind Regards");
}
</script>
<a href="#" onClick='doIt();'>do it</a>
</html>
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 90 total points
ID: 10841473
Yes there are limitation on GET

Michel
0
 

Author Comment

by:itimes
ID: 10841506
caner_elci,

Tried this and still get teh same error ...

mplungjan,

If there is a limit surley "window.open" should work then as there is not form of posting being done there ???

HElp ....
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:caner_elci
ID: 10841548
I tried it and it works.. what browser are you using?
0
 

Author Comment

by:itimes
ID: 10841576
IE 6.1 for WIN98

This is teh exact code :

window.open("mailto:"+document.Int.appEmail.value+"?subject=Re: Your Interview Details - " +Intdate+"&body=Hi " + Candidatename + "%0D%0A%0D%0A" + "I just want to confirm your interview details" + "%0D%0A%0D%0A" + "The Client is " + document.Int.client.value + " and the position is:" + "%0D%0A%0D%0A" + document.Int.Position.value + "%0D%0A%0D%0A" + "Your Interview Date and Time is : " + Intdate + " and will be with " + document.Int.intwith.value + ", " + document.Int.intwithjt.value + "%0D%0A%0D%0A" + "Comments: " + document.Int.intcomments.value + "%0D%0A%0D%0A" + "Dress Code: " + document.Int.Dress_Code.value + "%0D%0A%0D%0A" + "I suggest you visit");
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 10841740
window.open and location= is the same. Both are using get

Michel
0
 

Author Comment

by:itimes
ID: 11342349
Turned out to be a Bug on win98 and ie 6 as theres seems to be a limit on teh amout of body text you can assign froma mailtyo ... works great on XP win2000
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question