Form Output Opens New Window

liunx

Guest
I made a form <a href="http://lyricsplayground.com/new_submit.html" target="_blank">here</a> that a user would enter song title, author, artist and lyrics into seperate fields. The form outputs this info into a formatted html template (in a new window) ready to be saved and used onsite.<br /><br />It would make more sense for me to have the form mail the output instead of spawning a new window. I must be too waterlogged to figure it out cuz I'm getting nowhere fast.<br /><br />Any ideas?<br />Thanks <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />P.S. Here's the script<br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><html><br /><head><br /><script language =" javascript"><br /><br /><!-- begin <br />function create(form) {        <br />if (confirm("create template?")) {        <br />lyricwin = window.open("","lyricwin","toolbar=no,width=570,height=450,directories=no,status=yes,scrollbars=yes,resize=<br />o,menubar=no");                <br />with (lyricwin.document) {                <br />writeln ("<html><br><head><br><br><title>"+ form.input1.value + "</title><br>");<br />writeln ("<link rel=stylesheet href=http://www.totalchoicehosting.com/forums/lofiversion/index.php/\"/css/songpagestyles.css\" type=\"text/css\"><br><br><br>");          <br />writeln ("</head><br><body><br>");                <br />writeln ("<?php<br>include $_SERVER['DOCUMENT_ROOT'].\"/alpha/songs/includes/songheader.inc\";<br>?><br><br>");  <br />writeln ("<?php<br>include $_SERVER['DOCUMENT_ROOT'].\"/alpha/songs/includes/texttoggle.inc\";<br>?><br><br>");<br />writeln ("<table width=750 align=center border=0 cellpadding=5 cellspacing=1><br>");<br />writeln ("<tr valign=top align=center><br>");<br />writeln ("<td align=left><br>");<br />writeln ("<h1><pre><div id=lyr><br>");<br />writeln ("<font face=arial><br>");<br />writeln ("<!-----------------spacer-------------------><br>");<br />writeln (form.input1.value + "<br>");<br />writeln (form.input2.value + "<br>");<br />writeln (form.input3.value + "<br><br><br>");<br />writeln ("<pre>" + form.input4.value + "</pre>" + "<br>");<br />writeln ("<!-----------------spacer-------------------><br>");<br />writeln ("</div></pre></h1><br>");<br />writeln ("</td><br>");<br />writeln ("<td align=right><br><br>");<br />writeln ("<?php<br>");<br />writeln ("include $_SERVER['DOCUMENT_ROOT'].\"/alpha/songs/includes/google_ads.inc\";<br>");<br />writeln ("?><br><br>");<br />writeln ("</td><br>");<br />writeln ("</tr><br>");<br />writeln ("<tr valign=top align=center><br>");<br />writeln ("<td colspan=2><hr></td><br>");<br />writeln ("</tr><br>");<br />writeln ("</table><br>");<br />writeln ("</body><br>");<br />writeln ("</html><br>");<br />      }        <br />  }<br />}<br />// end --><br /></script><br /><br /><br /><body><br /><br /><center><br /><form><br /><table border = 0 cellpadding = 1><br /><tr><br /><td><b>Song Title:</b></td><br /><br /><td><input type="text" name="input1" size=61><br></td><br /></tr><tr><br /><td><b>Author(s):</b></td><br /><td><input type="text" name="input2" size=61><br></td><br /></tr><tr><br /><td><b>Artist(s):</b></td><br /><td><input type="text" name="input3" size=61><br></td><br /></tr><tr><br /><td><b>Lyrics :</b></td><br /><td><textarea wrap=virtual name="input4" cols=45 rows=10></textarea></td><br /></tr><br /></table><br /><br><br /><input type =" submit" value="Create It!" onclick =" create(this.form)"><br /><br /></form><br /></center><br /></body><br /></html><!--QuoteEnd--></div><!--QuoteEEnd--><!--content-->
Hey there ...<br /><br />The only way to send a mail note is to use a script that runs on the server side. Your script runs on the client's computer.<br /><br />So either you envoke some "Form mail" type of script that's ready made, or you send the data to a script (Perl/PHP) that sends out a mail note.<!--content-->
Thanks. Yes, yes - I'll have to try something of the sort.<br /><br />This will of course require figuring it out.<br /><br />Ohhhhhhhh the pain.................... <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/tongue.gif" style="vertical-align:middle" emoid=":p" border="0" alt="tongue.gif" /><!--content-->
 
Top