itimes
asked on
Mailto using document.location="mailto:"
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.appEm ail.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.v alue + "%0D%0A%0D%0A" + "Shiiping Code: " + document.Int.Code.value + "%0D%0A%0D%0A" + " Kind Regards"
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:
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I tried it and it works.. what browser are you using?
ASKER
IE 6.1 for WIN98
This is teh exact code :
window.open("mailto:"+docu ment.Int.a ppEmail.va lue+"?subj ect=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.valu e + "%0D%0A%0D%0A" + "Your Interview Date and Time is : " + Intdate + " and will be with " + document.Int.intwith.value + ", " + document.Int.intwithjt.val ue + "%0D%0A%0D%0A" + "Comments: " + document.Int.intcomments.v alue + "%0D%0A%0D%0A" + "Dress Code: " + document.Int.Dress_Code.va lue + "%0D%0A%0D%0A" + "I suggest you visit");
This is teh exact code :
window.open("mailto:"+docu
window.open and location= is the same. Both are using get
Michel
Michel
ASKER
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
ASKER
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 ....