Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: How can I use the

tag with action="mailto:address@x..."

Message #1 by formula1@o... on Tue, 19 Dec 2000 04:47:36 -0000
Whooops, replied to the wrong message.
This was supposed to be a reply to "How can I use the <form> tag with 
action="mailto:address@x...""
Sorry.

Imar

***Moderator: Woops, I missed it too! Busy morning (lot of messages on the lists) - sorry!***


At 10:24 AM 12/19/2000 +0100, you wrote:
>Below is some code that does just that. It's not mine, but I found it on 
>the net a long time ago. If somebody thinks he owns this, sorry for 
>stealing ;-)
>
>It needs some modification, but it might give you some ideas............
>
>Imar
>
>
><SCRIPT language=JavaScript>
><!--
>   // this line adds line breaks for the final output in textarea, so it will
>   // be formatted correctly, not just one very long line
>
>if (navigator.appVersion.lastIndexOf('Win') != -1)
>{
>         addreturn = "\r\n"  } else { addreturn = "\n"
>}
>
>function makemessage(form)
>{
>document.mailto.Message.value = (
>
>// This is exactly how
>// the output will be displayed.  The text inside the ' and '
>// will be displayed exactly as shown (if using monospaced font) this is 
>called a
>// string and how it is displayed compared to the strings above it will 
>make the
>// everything line up in the output. You can include a string containing 
>only spaces.
>// The addreturn adds a line break. The + adds the next item.  There
>// must be a + before every new variable or string ( '  ' )
>// the first line below makes two blank lines appear first
>   '  ' + addreturn
>   + '------------------------------------------------- ' + addreturn
>   + 'Your Name    : ' + document.mailto.name.value + addreturn
>   + 'The Subject  : ' + document.mailto.subject2.value + addreturn
>   + 'Their E-mail : ' + document.mailto.emailto.value + addreturn
>   + 'Their message: ' + addreturn + document.mailto.comments.value
>   + '  ' + addreturn
>   + '  ' + addreturn
>   + '  ' + addreturn
>   + '------------------------------------------------- ' + addreturn
>   + addreturn + 'Sent using Easy to Read Mailto: Forms' + addreturn
>   + '------------------------------------------------- ' + addreturn
>   + ' Everything below is every fields value ' + addreturn
>   + '  ' + addreturn
>
>);
>// ends function
>}
>// --></SCRIPT>
><!-- The Form --><FORM name="mailto"
>  method="post"
>  action="mailto:youremailaddresshere?subject=Message"
>  enctype="text/plain"><INPUT type=hidden name="Message">
><TABLE BORDER=0 >
><TR>
><TD>Your Name:</TD>
>
><TD><INPUT type="text" size=40 name="name" onChange="makemessage()"></TD>
></TR>
>
><TR>
><TD>Your Email:</TD>
>
><TD><INPUT type="text" size=40 name="emailto" onChange="makemessage()"></TD>
></TR>
>
><TR>
><TD>The Subject </TD>
>
><TD><INPUT type="text" size=40 name="subject2" onChange="makemessage()"></TD>
></TR>
>
><TR>
><TD>Your Message:</TD>
>
><TD><TEXTAREA rows=4 cols=35 wrap="auto" name=comments 
>onChange="makemessage()"></TEXTAREA></TD>
></TR>
>
><TR>
><TD><INPUT type=submit value="Send" onClick="makemessage()">
>
></FORM>
></td></tr></table>
>
>
>
>
>At 06:19 PM 12/18/2000 -0800, you wrote:
>
>>I don t know why I am having such a hard time with this one, it seems so 
>>simple.  Must be old age or brain fade.
>>
>>
>>
>>All I want to do is present the user with a select button on a 
>>form.  When the user clicks on the button, the form will create a new 
>>.csv file.
>>
>>
>>
>>I have everything else working just fine, but the browser simply opens 
>>the .csv file instead of prompting them to save it.
>>
>>
>>
>>I have tried <A> tags with Href s, Response.BinaryWrite objStream.Read 
>>and others.
>>
>>
>>
>>What is the basic concept I am missing?
>>
>>
>>
>>Thanks, Mike.

--- 
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 
Web Development, Networking & Communications, and Hardware & Systems.  
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to html_code_clinic as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-html_code_clinic-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index