Welcome visitor
* Login
* Register
It is currently January 24th, 2019, 10:38 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Print an empty form
PostPosted: September 29th, 2009, 3:16 pm 

Posts: 16
Im looking for a way to print a form in blank no matter the values it may have on the screen, does anyone knows how to do this? Thank you.


Top
 Profile  
 
  Re: Print an empty a form
PostPosted: September 29th, 2009, 4:23 pm 
User avatar

Posts: 112
if you want to use pure html check out this topic, http://www.scriptingok.com/forum/viewtopic.php?f=5&t=880
this is how i would do it with javascript
<script type="text/javascript">
var a=new Array();
function printtheform(){
for(i=0;i<document.forms[0].length;i++)
{a[i]=document.forms[0].elements[i].value;
document.forms[0].elements[i].value='';}
print();
alert('click ok after page is printed to restore the values');
for(i=0;i<document.forms[0].length;i++)
{document.forms[0].elements[i].value=a[i];
a[i]='';}}
</script>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron