Forum Moderators: open
1. I would like to disable the scrolling of the wheel mouse, changing the selections by scrolling, in a drop-down box. Is this possible and, if so, what is the code?
2. I'm setting up a simple form, <Form Method="post" action="mailto:">, and just having the results emailed. Is there any code that formats the way the results arrive in the email? I know enctype="text/plain" helps some, but I'm looking for a way to space it out and make it look a little neater.
Thanks in advance,
Good_Hands
Have I got bad news for you ;)
1. No.
2. Don't do this. On many peoples computers the mailto:-action doesn't work, let alone that some message gets pasted into the body. Use a server side script: they work with any browser and often allow you to format the output. Proper providers provide such scripts as a free service.
As far as the mailto: goes, I know it's a lame way to go, but it's a survey for an internet where all the desktops are the same. And they'll be lucky if 10 people take the survey, so time-wise it's not worth setting up and using a script. (Not to mention, they'd probably make me go through the change process to get one little script approved, and that would take about a month.) Thus, I am just doing mailto: and having the results sent to the appropriate manager. But, of course, he wants the results spaced a little so it's easier to read for him.
End result, I know mailto: is bad, but it'll work and it's already done. Sooo, anyone know if it's possible to play with the way the results end up in the email? No big deal if not.
Thanks again ~ Good Hands
<script type="text/javascript">
function makemail() {
var message = "", i;
for (i = 0; i < document.myform.length -1; i++) {
el = document.myform.elements[i];
message += el.name + ": " + el.value + "\n";
}
//alert(message);
document.myform.action = "mailto:goodhands@domain.tld?subject=survey&body=" + message;
document.myform.submit();
}
</script>
<form onsubmit="makemail(); return false" name="myform">
<input type="text" name="bla1"><br>
<input type="text" name="bla2">
<input type="submit">
</form>
mailto: is messed up on my PC, so I can't fully test the script. Hope this helps anyway...