Richsparov
08-21-2002, 01:39 PM
OK, here is my current conundrum.
I have a form which needs a signature but I still want to collect the data in a csv. So what I am after is a way of printing and submitting the form at the same time.
EASY - i hear you cry.
however I have a number of textareas in the form so I am using a strip out special characters script which i have to call aswell and it is this that is causing me angst...
When i try and call both it tells me that my textarea is undefined or null.
The code I am using is as follows:
<SCRIPT LANGUAGE="JavaScript">
<!--
function printPage() {
if (window.print)
window.print()
else
alert("Sorry, your browser doesn't support this feature.");
}
// -->
</SCRIPT>
<script language="javascript">
<!-- Begin
function whatIsThis() {
document.myform.textone.value = escape(document.myform.textone.value);
}
//-->
</script>
and then the submit button is doing the following
<a href="javascript:document.myform.submit();" onClick="printPage();whatIsThis();">
<img src="submit.gif" width="52" height="18" border="0">
</a>
I am using a generic form into csv handler so can't write a specific form handler that does exactly what I want.
any solutions?
Do you need further info to help? If so what info do you need?
All help greatly appreciated.
Regards
Richard
I have a form which needs a signature but I still want to collect the data in a csv. So what I am after is a way of printing and submitting the form at the same time.
EASY - i hear you cry.
however I have a number of textareas in the form so I am using a strip out special characters script which i have to call aswell and it is this that is causing me angst...
When i try and call both it tells me that my textarea is undefined or null.
The code I am using is as follows:
<SCRIPT LANGUAGE="JavaScript">
<!--
function printPage() {
if (window.print)
window.print()
else
alert("Sorry, your browser doesn't support this feature.");
}
// -->
</SCRIPT>
<script language="javascript">
<!-- Begin
function whatIsThis() {
document.myform.textone.value = escape(document.myform.textone.value);
}
//-->
</script>
and then the submit button is doing the following
<a href="javascript:document.myform.submit();" onClick="printPage();whatIsThis();">
<img src="submit.gif" width="52" height="18" border="0">
</a>
I am using a generic form into csv handler so can't write a specific form handler that does exactly what I want.
any solutions?
Do you need further info to help? If so what info do you need?
All help greatly appreciated.
Regards
Richard