problem with java script mailto hyperlink
i am using a java script with a mailto hyper link so that the e-mail box that comes up has a predetermined body. i am using the java script because i need a farely long body. the only problem is.. the body i need it too long. it works fine if i shorten it.. but it gives me errors when i get it as long as it need it to be.
thanks in advance for any help
This is the script i am using.. it works fine like this but if i change the 'Body of E-mail' messages to anything longer than that i get the errors.
Give me what I want, and I'll go away!
voicebox posted this at 22:47 — 27th October 2000.
They have: 9 posts
Joined: Oct 2000
You may need to add your own form. Put this code somewhere on your web page:
<form name="email" action="mailto:" method="post">
<input type="hidden" name="subject">
<input type="hidden" name="body">
</form>
And below the marker // BUILD MAIL MESSAGE COMPONENTS
put this code instead:
// BUILD MAIL MESSAGE COMPONENTS
var e = document.email;
e.action = "mailto:" + to;
e.subject.value = subject;
e.body.value = body;
// POP UP EMAIL MESSAGE WINDOW
e.submit();
[email protected] posted this at 13:24 — 30th October 2000.
They have: 12 posts
Joined: Oct 2000
Thanks, but I don't think thats gonna do what i need it to do. I can't send it through i form because when the e-mail message pops up they need to be able to attach a file to it.
The actual problem i am having is when i add to many body lines i start to get an "invalid pointer" error.
[Edited by [email protected] on 10-30-2000 at 08:27 AM]
Give me what I want, and I'll go away!
voicebox posted this at 22:17 — 30th October 2000.
They have: 9 posts
Joined: Oct 2000
Try putting this code within the form lines I gave you:
<input type="file" name="attach">
This will give a box with a Browse button, and users should be able to attach a file with it.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.